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 listMay 23, 2024 07:10Maxim ElchuginMaxim ElchuginScore: 109,681Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 23, 2024 07:10108,70561,667,90338,210,0002,011,0002,281,472
2May 23, 2024 07:10109,00361,611,55738,315,0002,016,0002,326,528
3May 23, 2024 07:10109,01165,599,13237,309,0003,025,0002,506,752
4May 23, 2024 07:10109,29765,101,52438,418,0002,022,0002,281,472
5May 23, 2024 07:10109,31463,266,36138,424,0002,022,0002,281,472
6May 23, 2024 07:10109,46567,961,55839,490,0001,012,0002,281,472
7May 23, 2024 07:10109,68162,643,61639,568,0001,014,0002,502,656
8May 23, 2024 07:10110,36271,793,79738,843,0001,991,0002,498,560
9May 23, 2024 07:10110,44971,403,93237,876,0002,990,0002,510,848
10May 23, 2024 07:10114,294111,295,30242,288,88402,228,224
11May 23, 2024 07:10114,81996,140,87142,483,02802,228,224
12May 23, 2024 07:10115,489107,794,86142,731,09302,232,320