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 28, 2023 21:18Franek KortaFranek KortaScore: 72,968Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Aug 28, 2023 21:1872,19255,950,22525,684,0001,027,0002,437,120
2Aug 28, 2023 21:1972,20851,888,51224,662,0002,055,0002,269,184
3Aug 28, 2023 21:1872,57056,828,32325,857,000994,0002,531,328
4Aug 28, 2023 21:1972,57648,617,81925,859,000994,0002,269,184
5Aug 28, 2023 21:1872,58150,044,75825,861,000994,0002,269,184
6Aug 28, 2023 21:1972,60053,061,90223,878,0002,984,0002,265,088
7Aug 28, 2023 21:1872,60049,756,01925,868,000994,0002,441,216
8Aug 28, 2023 21:1972,60354,748,03325,869,000994,0002,433,024
9Aug 28, 2023 21:1972,61157,321,00225,871,000995,0002,531,328
10Aug 28, 2023 21:1972,61955,577,99925,874,000995,0002,269,184
11Aug 28, 2023 21:1872,64949,236,28624,889,0001,991,0002,433,024
12Aug 28, 2023 21:1872,67349,779,94725,855,0001,034,0002,527,232
13Aug 28, 2023 21:1972,96848,793,69325,999,000999,0002,428,928
14Aug 28, 2023 21:1872,99752,205,40426,009,0001,000,0002,531,328
15Aug 28, 2023 21:1873,00550,356,55426,012,0001,000,0002,437,120
16Aug 28, 2023 21:1973,01650,106,13626,016,0001,000,0002,527,232
17Aug 28, 2023 21:1973,05753,616,18926,030,0001,001,0002,437,120
18Aug 28, 2023 21:1873,07862,613,53725,037,0002,002,0002,269,184
19Aug 28, 2023 21:1977,43783,481,88028,651,84602,289,664
20Aug 28, 2023 21:1877,54882,599,25828,692,88302,277,376
21Aug 28, 2023 21:1977,94590,325,28428,839,70702,170,880
22Aug 28, 2023 21:1878,01393,185,33328,864,74302,285,568
23Aug 28, 2023 21:1978,26094,157,88028,956,04702,289,664
24Aug 28, 2023 21:1878,32190,196,62528,978,76802,293,760