TopK Sergey Svistunov

Find the sum of the 100 largest values in a stream of binary integers as fast as possible.

Input: 100 000 000 uint32 values in little-endian binary on STDIN (4 bytes each).

Output: The uint64 sum of the top 100 greatest values, printed as a decimal string.

Back to listSep 16, 2023 10:32mmalczakmmalczakScore: 120,597Success
Source Code

Source code access is restricted. Log in to request access.

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 16, 2023 10:32108,222106,504,00240,042,11102,256,896
2Sep 16, 2023 10:32109,426124,840,41040,487,54302,269,184
3Sep 16, 2023 10:32110,447112,126,17240,865,32802,265,088
4Sep 16, 2023 10:32119,68668,290,93642,272,0002,012,0002,269,184
5Sep 16, 2023 10:32120,14667,410,21043,444,0001,010,0002,510,848
6Sep 16, 2023 10:32120,27666,958,96144,502,00002,269,184
7Sep 16, 2023 10:32120,59770,745,29343,607,0001,014,0002,289,664
8Sep 16, 2023 10:32120,74172,620,49843,659,0001,015,0002,289,664
9Sep 16, 2023 10:32121,17877,678,74742,844,0001,992,0002,289,664
10Sep 16, 2023 10:32121,35967,946,00042,908,0001,995,0002,289,664
11Sep 16, 2023 10:32121,54975,037,77743,974,000999,0002,289,664
12Sep 16, 2023 10:32121,89573,693,30745,101,00002,289,664