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:33Steve 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:3200000Error: expected "429496538413 ", got "429496538413c: 429496486582 m: d: -51831 "stderr
2Apr 21, 2025 04:3373,59556,916,43324,205,0003,025,0002,531,328
3Apr 21, 2025 04:3373,81449,725,82926,300,0001,011,0002,428,928
4Apr 21, 2025 04:3374,26552,147,81726,461,0001,017,0002,531,328