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 listAug 4, 2022 20:12Franek KortaFranek KortaScore: 77,122Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Aug 4, 2022 20:1276,11149,593,62126,150,0002,011,0002,285,568
2Aug 4, 2022 20:1276,25449,935,84824,184,0004,030,0002,281,472
3Aug 4, 2022 20:1276,31954,652,91626,221,0002,017,0002,281,472
4Aug 4, 2022 20:1276,47355,014,33926,274,0002,021,0002,281,472
5Aug 4, 2022 20:1276,50352,004,26026,285,0002,021,0002,527,232
6Aug 4, 2022 20:1276,59751,021,53927,329,0001,012,0002,281,472
7Aug 4, 2022 20:1276,63551,177,19926,330,0002,025,0002,269,184
8Aug 4, 2022 20:1276,64152,621,41924,306,0004,051,0002,527,232
9Aug 4, 2022 20:1276,65150,777,08626,336,0002,025,0002,523,136
10Aug 4, 2022 20:1276,75955,938,37728,401,00002,281,472
11Aug 4, 2022 20:1276,78149,794,44426,380,0002,029,0002,531,328
12Aug 4, 2022 20:1277,01951,866,23927,480,0001,017,0002,281,472
13Aug 4, 2022 20:1277,12250,895,74926,497,0002,038,0002,281,472
14Aug 4, 2022 20:1277,26555,067,30426,546,0002,042,0002,527,232
15Aug 4, 2022 20:1277,91158,755,94826,839,0001,988,0002,531,328
16Aug 4, 2022 20:1277,98154,834,13826,864,0001,989,0002,523,136
17Aug 4, 2022 20:1278,00854,958,86126,873,0001,990,0002,281,472
18Aug 4, 2022 20:1278,13556,374,52226,917,0001,993,0002,281,472
19Aug 4, 2022 20:1279,996104,141,96629,598,52402,252,800
20Aug 4, 2022 20:1280,22696,386,05729,683,58902,256,896
21Aug 4, 2022 20:1281,09290,680,97130,003,96702,256,896
22Aug 4, 2022 20:1281,095110,855,74330,005,29402,260,992
23Aug 4, 2022 20:1282,38895,795,69930,483,42502,265,088
24Aug 4, 2022 20:1284,650126,927,77031,320,47102,265,088