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 22, 2025 20:41Steve 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 22, 2025 20:4100000Error: expected "429496472671 ", got "429496472671c: 429496486582 m: d: 13911 "stderr
2Apr 22, 2025 20:4168,11148,369,67923,185,0002,016,0002,433,024
3Apr 22, 2025 20:4168,15746,548,10424,210,0001,008,0002,539,520
4Apr 22, 2025 20:4168,22446,067,96123,224,0002,019,0002,433,024
5Apr 22, 2025 20:4168,41647,875,68125,314,00002,539,520
6Apr 22, 2025 20:4168,44144,242,08525,323,00002,277,376
7Apr 22, 2025 20:4168,45144,743,77224,314,0001,013,0002,428,928
8Apr 22, 2025 20:4168,70554,356,60424,405,0001,016,0002,277,376
9Apr 22, 2025 20:4168,81146,424,49925,460,00002,539,520
10Apr 22, 2025 20:4168,87047,312,81525,482,00002,424,832