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:47Steve 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:4400000Error: expected "429496447287 ", got "429496447287c: 429496486582 m: d: 39295 "stderr
2Apr 21, 2025 05:4770,52753,767,62124,088,0002,007,0002,531,328
3Apr 21, 2025 05:4770,63050,716,05525,128,0001,005,0002,527,232
4Apr 21, 2025 05:4770,75449,919,45625,173,0001,006,0002,433,024
5Apr 21, 2025 05:4770,81457,522,97525,194,0001,007,0002,531,328
6Apr 21, 2025 05:4770,91945,825,39725,231,0001,009,0002,531,328
7Apr 21, 2025 05:4770,95450,427,60325,244,0001,009,0002,531,328
8Apr 21, 2025 05:4771,12446,963,38326,316,00002,531,328
9Apr 21, 2025 05:4771,27648,451,88225,358,0001,014,0002,531,328
10Apr 21, 2025 05:4771,28450,776,91224,347,0002,028,0002,527,232