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 listSep 20, 2023 19:32mmalczakmmalczakScore: 105,119Success
Source Code

Source code access is restricted. Log in to request access.

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 20, 2023 19:32104,21963,024,38538,561,00002,289,664
2Sep 20, 2023 19:32104,54365,892,51237,664,0001,017,0002,277,376
3Sep 20, 2023 19:32104,57364,689,11937,674,0001,018,0002,273,280
4Sep 20, 2023 19:32104,97661,748,29137,846,000995,0002,269,184
5Sep 20, 2023 19:32105,04968,165,74036,875,0001,993,0002,289,664
6Sep 20, 2023 19:32105,10361,178,44636,894,0001,994,0002,289,664
7Sep 20, 2023 19:32105,11965,841,50137,871,0001,023,0002,273,280
8Sep 20, 2023 19:32105,17861,027,37136,921,0001,995,0002,289,664
9Sep 20, 2023 19:32106,34961,394,67237,332,0002,017,0002,289,664
10Sep 20, 2023 19:32106,381101,162,14039,361,04902,265,088
11Sep 20, 2023 19:32106,640120,777,20439,456,91402,269,184
12Sep 20, 2023 19:32106,732110,052,82639,490,99702,256,896