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 19:05mmalczakmmalczakScore: 84,214Success
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 19:0583,53256,725,49529,877,0001,030,0002,289,664
2Sep 16, 2023 19:0583,54154,734,70528,916,0001,994,0002,289,664
3Sep 16, 2023 19:0583,84956,190,98729,023,0002,001,0002,289,664
4Sep 16, 2023 19:0583,92454,069,30129,049,0002,003,0002,289,664
5Sep 16, 2023 19:0584,05953,873,01529,096,0002,006,0002,273,280
6Sep 16, 2023 19:0584,13253,987,32829,121,0002,008,0002,277,376
7Sep 16, 2023 19:0584,21454,677,97929,149,0002,010,0002,523,136
8Sep 16, 2023 19:0584,48152,512,23129,242,0002,016,0002,269,184
9Sep 16, 2023 19:0585,24293,232,42831,539,66802,256,896
10Sep 16, 2023 19:0585,46560,652,80830,602,0001,020,0002,269,184
11Sep 16, 2023 19:0585,97498,046,95931,810,31402,256,896
12Sep 16, 2023 19:0586,737105,828,00132,092,62402,265,088