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:16mmalczakmmalczakScore: 72,986Success
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:1672,48953,984,70026,821,00002,289,664
2Sep 24, 2023 21:2072,52253,014,39824,846,0001,987,0002,523,136
3Sep 24, 2023 21:1672,54955,110,04725,849,000994,0002,289,664
4Sep 24, 2023 21:2072,71149,067,34624,911,0001,992,0002,289,664
5Sep 24, 2023 21:2072,74354,281,09325,919,000996,0002,289,664
6Sep 24, 2023 21:1672,77353,982,64624,932,0001,994,0002,269,184
7Sep 24, 2023 21:2072,77857,526,74124,934,0001,994,0002,289,664
8Sep 24, 2023 21:1672,80055,897,76724,941,0001,995,0002,289,664
9Sep 24, 2023 21:2072,86548,777,11924,963,0001,997,0002,527,232
10Sep 24, 2023 21:2072,87351,989,13124,966,0001,997,0002,289,664
11Sep 24, 2023 21:2072,92748,797,10325,984,000999,0002,289,664
12Sep 24, 2023 21:1672,94658,758,68324,991,0001,999,0002,289,664
13Sep 24, 2023 21:1672,98649,529,10425,005,0002,000,0002,527,232
14Sep 24, 2023 21:2072,98948,812,16225,006,0002,000,0002,289,664
15Sep 24, 2023 21:1673,01648,701,38025,015,0002,001,0002,527,232
16Sep 24, 2023 21:1673,09251,159,86425,041,0002,003,0002,289,664
17Sep 24, 2023 21:1673,24151,049,04626,096,0001,003,0002,527,232
18Sep 24, 2023 21:2073,38450,882,21825,141,0002,011,0002,269,184
19Sep 24, 2023 21:1675,82996,079,02328,056,77102,260,992
20Sep 24, 2023 21:1675,83491,035,08128,058,57802,256,896
21Sep 24, 2023 21:1675,95592,299,68728,103,41002,269,184
22Sep 24, 2023 21:2076,00989,359,14928,123,40902,273,280
23Sep 24, 2023 21:2076,07892,978,79128,148,83302,260,992
24Sep 24, 2023 21:2076,178103,750,22328,185,90902,269,184