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 3, 2023 21:57Franek KortaFranek KortaScore: 72,570Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 3, 2023 21:5771,83052,914,33625,555,0001,022,0002,531,328
2Apr 3, 2023 21:5771,96849,919,65926,628,00002,449,408
3Apr 3, 2023 21:5772,04349,415,25826,656,00002,449,408
4Apr 3, 2023 22:0272,11158,357,55226,681,00002,527,232
5Apr 3, 2023 22:0272,25951,097,19426,736,00002,445,312
6Apr 3, 2023 21:5772,49553,675,15626,823,00002,445,312
7Apr 3, 2023 22:0272,51654,435,22824,844,0001,987,0002,527,232
8Apr 3, 2023 22:0272,54952,616,31125,849,000994,0002,531,328
9Apr 3, 2023 22:0272,54948,887,29023,861,0002,982,0002,269,184
10Apr 3, 2023 22:0272,55457,870,53325,851,000994,0002,531,328
11Apr 3, 2023 22:0272,56252,207,44925,854,000994,0002,531,328
12Apr 3, 2023 22:0272,56558,467,78925,855,000994,0002,445,312
13Apr 3, 2023 21:5772,57050,004,31025,857,000994,0002,531,328
14Apr 3, 2023 21:5772,57650,519,15125,859,000994,0002,527,232
15Apr 3, 2023 21:5772,58452,554,82225,862,000994,0002,437,120
16Apr 3, 2023 22:0272,61653,987,51525,873,000995,0002,445,312
17Apr 3, 2023 21:5772,61654,459,08525,873,000995,0002,269,184
18Apr 3, 2023 21:5772,68645,490,47025,898,000996,0002,531,328
19Apr 3, 2023 21:5776,33592,622,60428,244,05102,293,760
20Apr 3, 2023 22:0276,34582,458,39528,247,81702,297,856
21Apr 3, 2023 22:0276,50489,149,13428,306,43202,297,856
22Apr 3, 2023 21:5776,660101,092,03228,364,31402,174,976
23Apr 3, 2023 21:5776,78282,777,84828,409,35202,289,664
24Apr 3, 2023 22:0276,85798,665,94028,436,91702,170,880