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 24, 2023 21:13mmalczakmmalczakScore: 72,957Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 24, 2023 21:1172,55457,289,82724,857,0001,988,0002,289,664
2Sep 24, 2023 21:1372,58655,093,12824,868,0001,989,0002,277,376
3Sep 24, 2023 21:1172,60352,828,50624,874,0001,989,0002,289,664
4Sep 24, 2023 21:1172,61454,773,06925,834,0001,033,0002,289,664
5Sep 24, 2023 21:1372,61949,391,21524,879,0001,990,0002,379,776
6Sep 24, 2023 21:1172,69252,673,41025,900,000996,0002,289,664
7Sep 24, 2023 21:1172,78450,841,62124,936,0001,994,0002,289,664
8Sep 24, 2023 21:1172,83249,742,86325,950,000998,0002,273,280
9Sep 24, 2023 21:1372,84649,586,51024,957,0001,996,0002,269,184
10Sep 24, 2023 21:1172,88449,950,96124,970,0001,997,0002,375,680
11Sep 24, 2023 21:1372,90357,676,27624,976,0001,998,0002,289,664
12Sep 24, 2023 21:1372,93848,299,03425,988,000999,0002,281,472
13Sep 24, 2023 21:1172,95747,693,83625,995,000999,0002,289,664
14Sep 24, 2023 21:1172,98653,142,56126,005,0001,000,0002,527,232
15Sep 24, 2023 21:1373,00053,930,05625,010,0002,000,0002,289,664
16Sep 24, 2023 21:1373,03848,456,64526,024,0001,000,0002,289,664
17Sep 24, 2023 21:1373,07357,514,86525,035,0002,002,0002,289,664
18Sep 24, 2023 21:1373,13053,048,35726,056,0001,002,0002,392,064
19Sep 24, 2023 21:1175,61385,389,96927,976,69902,265,088
20Sep 24, 2023 21:1175,62089,687,46427,979,24402,277,376
21Sep 24, 2023 21:1175,879123,510,10128,075,36502,273,280
22Sep 24, 2023 21:1376,060112,012,32928,142,17902,273,280
23Sep 24, 2023 21:1376,10988,186,83228,160,40102,256,896
24Sep 24, 2023 21:1376,16596,330,28428,180,86502,265,088