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 listApr 21, 2025 04:51Steve BronderSteve BronderError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 21, 2025 04:5000000Error: expected "429496485466 ", got "429496485466c: 429496486582 m: d: 1116 "stderr
2Apr 21, 2025 05:0372,56251,959,09225,854,000994,0002,269,184
3Apr 21, 2025 04:5172,57852,075,16624,865,0001,989,0002,531,328
4Apr 21, 2025 04:5372,59255,263,90924,870,0001,989,0002,424,832
5Apr 21, 2025 04:5472,61452,404,24826,867,00002,433,024
6Apr 21, 2025 04:5472,62253,578,07325,875,000995,0002,269,184
7Apr 21, 2025 04:5372,62752,857,03025,877,000995,0002,433,024
8Apr 21, 2025 05:0372,63248,775,22026,874,00002,420,736
9Apr 21, 2025 04:5172,64948,532,63423,894,0002,986,0002,428,928
10Apr 21, 2025 04:5172,92254,856,70524,983,0001,998,0002,428,928
11Apr 21, 2025 04:5372,95447,919,42424,994,0001,999,0002,428,928
12Apr 21, 2025 04:5472,96550,730,78924,998,0001,999,0002,433,024
13Apr 21, 2025 05:0372,98649,694,29526,005,0001,000,0002,437,120