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:24Franek KortaFranek KortaScore: 89,041Success
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:2486,24357,691,87529,916,0001,994,0002,433,024
2Apr 9, 2023 20:2486,57659,212,44531,032,0001,001,0002,523,136
3Apr 9, 2023 20:2486,99255,330,27831,182,0001,005,0002,428,928
4Apr 9, 2023 20:2487,07853,803,40329,199,0003,020,0002,428,928
5Apr 9, 2023 20:2487,10557,038,40031,222,0001,007,0002,527,232
6Apr 9, 2023 20:2487,256100,125,74932,284,56902,293,760
7Apr 9, 2023 20:2487,270102,766,32432,289,82302,293,760
8Apr 9, 2023 20:2487,61190,891,22832,416,23902,293,760
9Apr 9, 2023 20:2487,91953,050,69932,530,00002,265,088
10Apr 9, 2023 20:2488,14360,676,59832,613,00002,433,024
11Apr 9, 2023 20:2488,76856,203,51231,849,000995,0002,527,232
12Apr 9, 2023 20:2488,79556,180,62531,859,000995,0002,527,232
13Apr 9, 2023 20:2489,04153,181,38630,949,0001,996,0002,527,232
14Apr 9, 2023 20:2489,23860,690,60232,018,0001,000,0002,531,328
15Apr 9, 2023 20:2489,64156,840,62331,157,0002,010,0002,265,088
16Apr 9, 2023 20:2490,50293,579,93433,485,69202,293,760
17Apr 9, 2023 20:2490,73051,391,44033,570,00002,527,232
18Apr 9, 2023 20:2490,77064,098,15233,585,00002,420,736
19Apr 9, 2023 20:2491,04955,966,35933,688,00002,269,184
20Apr 9, 2023 20:2491,21196,582,95533,748,00502,297,856
21Apr 9, 2023 20:2491,46863,598,01732,848,000995,0002,424,832
22Apr 9, 2023 20:2491,48657,824,94932,825,0001,025,0002,424,832
23Apr 9, 2023 20:2492,98696,714,75534,404,83302,289,664
24Apr 9, 2023 20:2494,37658,541,94932,924,0001,995,0002,531,328