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 20:37Steve 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 20:4600000Error: expected "429496546699 ", got "429496546699c: 429496486582 m: d: -60117 "stderr
2Apr 21, 2025 20:3768,08647,159,37023,177,0002,015,0002,433,024
3Apr 21, 2025 20:4668,46246,495,81125,331,00002,539,520
4Apr 21, 2025 20:4668,50047,355,46723,318,0002,027,0002,539,520
5Apr 21, 2025 20:4668,63049,284,49425,393,00002,277,376
6Apr 21, 2025 20:3768,65147,439,79324,385,0001,016,0002,539,520
7Apr 21, 2025 20:3768,75747,589,30325,440,00002,539,520