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 16, 2023 15:57mmalczakmmalczakScore: 98,749Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 16, 2023 15:5797,37057,440,07035,027,0001,000,0002,289,664
2Sep 16, 2023 15:5897,58960,348,90934,102,0002,006,0002,289,664
3Sep 16, 2023 15:5797,70864,509,54934,144,0002,008,0002,523,136
4Sep 16, 2023 15:5797,71959,129,67835,152,0001,004,0002,289,664
5Sep 16, 2023 15:5897,74662,707,82734,157,0002,009,0002,289,664
6Sep 16, 2023 15:5897,84360,664,55234,191,0002,011,0002,289,664
7Sep 16, 2023 15:5897,85963,497,86834,197,0002,011,0002,289,664
8Sep 16, 2023 15:5898,09761,818,98935,288,0001,008,0002,289,664
9Sep 16, 2023 15:5798,26263,056,65334,338,0002,019,0002,289,664
10Sep 16, 2023 15:5798,41657,733,82534,391,0002,023,0002,289,664
11Sep 16, 2023 15:5798,69560,571,67435,503,0001,014,0002,289,664
12Sep 16, 2023 15:5798,71960,539,28935,512,0001,014,0002,289,664
13Sep 16, 2023 15:5898,74966,226,60435,523,0001,014,0002,289,664
14Sep 16, 2023 15:5798,97060,158,32835,602,0001,017,0002,289,664
15Sep 16, 2023 15:5899,31799,275,74936,747,20902,277,376
16Sep 16, 2023 15:5799,36892,555,56236,766,32702,269,184
17Sep 16, 2023 15:5799,54363,028,30434,841,0001,990,0002,289,664
18Sep 16, 2023 15:5899,56265,510,26435,843,000995,0002,281,472
19Sep 16, 2023 15:5799,571102,139,32136,841,35302,256,896
20Sep 16, 2023 15:5899,62459,523,68434,869,0001,992,0002,289,664
21Sep 16, 2023 15:5899,86697,796,88236,950,49402,265,088
22Sep 16, 2023 15:5899,90057,331,28034,965,0001,998,0002,269,184
23Sep 16, 2023 15:57100,01696,594,18737,006,07902,277,376
24Sep 16, 2023 15:58100,687106,412,71937,254,03902,265,088