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 listApr 9, 2023 20:16Franek KortaFranek KortaScore: 84,376Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 9, 2023 20:2080,73257,411,10726,884,0002,987,0002,424,832
2Apr 9, 2023 20:2080,92250,569,59926,947,0002,994,0002,269,184
3Apr 9, 2023 20:1981,03252,895,25728,983,000999,0002,424,832
4Apr 9, 2023 20:1981,28452,810,43629,073,0001,002,0002,428,928
5Apr 9, 2023 20:1981,30551,811,03829,081,0001,002,0002,428,928
6Apr 9, 2023 20:1981,67657,721,76029,213,0001,007,0002,269,184
7Apr 9, 2023 20:2081,74654,090,32529,238,0001,008,0002,428,928
8Apr 9, 2023 20:2081,79250,529,84029,255,0001,008,0002,527,232
9Apr 9, 2023 20:2082,03852,063,59430,354,00002,527,232
10Apr 9, 2023 20:1982,26254,207,17428,338,0002,099,0002,531,328
11Apr 9, 2023 20:2082,43257,702,37630,500,00002,531,328
12Apr 9, 2023 20:2082,47353,787,57530,515,00002,527,232
13Apr 9, 2023 20:1982,62250,544,73729,551,0001,019,0002,527,232
14Apr 9, 2023 20:2083,34361,110,87329,843,000994,0002,527,232
15Apr 9, 2023 20:1983,34653,610,34329,844,000994,0002,527,232
16Apr 9, 2023 20:1983,43559,272,18428,880,0001,991,0002,424,832
17Apr 9, 2023 20:1983,837105,840,91231,019,75902,293,760
18Apr 9, 2023 20:1984,19558,557,62329,143,0002,009,0002,433,024
19Apr 9, 2023 20:2084,37651,630,83726,184,0005,035,0002,428,928
20Apr 9, 2023 20:1985,57185,337,19731,661,27502,297,856
21Apr 9, 2023 20:2086,63188,457,09932,053,49702,289,664
22Apr 9, 2023 20:1987,29997,188,03532,300,73002,289,664
23Apr 9, 2023 20:2087,763112,208,02232,472,48702,170,880
24Apr 9, 2023 20:2089,608100,177,35233,154,86402,293,760
25Apr 9, 2023 20:16110,87863,900,24340,025,0001,000,0002,433,024
26Apr 9, 2023 20:16112,07361,867,89741,467,00002,527,232
27Apr 9, 2023 20:16112,96264,904,50039,806,0001,990,0002,424,832
28Apr 9, 2023 20:16113,75967,977,56539,085,0003,006,0002,420,736
29Apr 9, 2023 20:16114,23066,435,96240,253,0002,012,0002,428,928
30Apr 9, 2023 20:16114,44671,159,57441,337,0001,008,0002,531,328
31Apr 9, 2023 20:16115,75468,957,55840,790,0002,039,0002,437,120
32Apr 9, 2023 20:16115,89267,578,62142,880,00002,428,928
33Apr 9, 2023 20:16117,355111,545,46543,421,41102,293,760
34Apr 9, 2023 20:16118,234109,693,42143,746,41802,179,072
35Apr 9, 2023 20:16118,714116,049,01343,924,12802,170,880
36Apr 9, 2023 20:16119,73265,117,09142,241,0002,060,0002,531,328