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 05:15Steve 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 05:1400000Error: expected "429496539052 ", got "429496539052c: 429496486582 m: d: -52470 "stderr
2Apr 21, 2025 05:1570,64648,721,14224,129,0002,010,0002,433,024
3Apr 21, 2025 05:1570,82246,772,45325,197,0001,007,0002,527,232
4Apr 21, 2025 05:1570,87843,905,68322,191,0004,034,0002,265,088
5Apr 21, 2025 05:1570,90847,808,99325,227,0001,009,0002,531,328
6Apr 21, 2025 05:1571,03855,015,03724,263,0002,021,0002,424,832
7Apr 21, 2025 05:1571,17851,148,58524,311,0002,025,0002,428,928
8Apr 21, 2025 05:1571,21153,161,29225,335,0001,013,0002,428,928
9Apr 21, 2025 05:1571,21453,873,75925,336,0001,013,0002,424,832
10Apr 21, 2025 05:1571,25950,907,23325,352,0001,014,0002,531,328