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:58Steve 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:4600000Error: expected "429496498777 ", got "429496498777c: 429496486582 m: d: -12195 "stderr
2Apr 21, 2025 04:5700000Error: expected "429496463741 ", got "429496463741c: 429496486582 m: d: 22841 "stderr
3Apr 21, 2025 04:5870,58447,965,52625,112,0001,004,0002,433,024
4Apr 21, 2025 04:5871,03053,236,20026,281,00002,428,928
5Apr 21, 2025 04:5871,06548,759,99525,283,0001,011,0002,428,928
6Apr 21, 2025 04:5871,11148,875,54626,311,00002,531,328
7Apr 21, 2025 04:4671,11444,432,08725,300,0001,012,0002,269,184
8Apr 21, 2025 04:4671,11448,658,90126,312,00002,424,832
9Apr 21, 2025 04:5871,14349,437,18325,311,0001,012,0002,424,832
10Apr 21, 2025 04:5871,16545,017,92124,306,0002,025,0002,433,024
11Apr 21, 2025 04:5871,21154,734,84725,335,0001,013,0002,428,928
12Apr 21, 2025 04:5871,46247,692,60326,441,00002,531,328
13Apr 21, 2025 04:4671,47356,473,98024,411,0002,034,0002,531,328
14Apr 21, 2025 04:5871,56851,796,71925,462,0001,018,0002,424,832