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 listMay 7, 2024 00:20Joad NacerJoad NacerError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 7, 2024 00:2100000Error: expected "429496466953 ", got "408021655731 "
2May 7, 2024 00:1900000Error: expected "429496443380 ", got "365072011512 "
3May 7, 2024 00:1900000Error: expected "429496449341 ", got "395136753391 "
4May 7, 2024 00:2065,03545,852,08122,058,0002,005,0002,523,136
5May 7, 2024 00:2065,07046,586,49322,070,0002,006,0002,289,664
6May 7, 2024 00:2065,14153,388,54022,094,0002,008,0002,265,088
7May 7, 2024 00:2065,17845,282,57822,107,0002,009,0002,273,280
8May 7, 2024 00:2065,26550,661,57623,142,0001,006,0002,289,664
9May 7, 2024 00:2065,34351,188,43122,163,0002,014,0002,269,184
10May 7, 2024 00:2065,36246,508,27122,169,0002,015,0002,289,664
11May 7, 2024 00:2065,51651,420,34422,221,0002,020,0002,289,664
12May 7, 2024 00:2065,54659,248,15723,242,0001,010,0002,289,664
13May 7, 2024 00:2368,70687,403,70525,421,14402,265,088
14May 7, 2024 00:2068,93790,784,17825,506,65602,277,376
15May 7, 2024 00:2368,945122,533,45225,509,72302,273,280
16May 7, 2024 00:2368,97695,755,42525,521,23402,273,280
17May 7, 2024 00:2069,11790,531,46725,573,38802,277,376
18May 7, 2024 00:2369,14291,187,45325,582,42002,273,280
19May 7, 2024 00:2369,198109,851,44225,603,30802,273,280
20May 7, 2024 00:2069,22783,208,79825,614,07502,260,992
21May 7, 2024 00:2369,447100,241,22525,695,32902,273,280