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:35Maxim ElchuginMaxim ElchuginScore: 94,211Success
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:3592,87659,984,08131,332,0003,032,0002,281,472
2May 23, 2024 07:3592,97663,700,98132,378,0002,023,0002,334,720
3May 23, 2024 07:3593,37855,416,63632,518,0002,032,0002,510,848
4May 23, 2024 07:3593,58165,407,34032,589,0002,036,0002,281,472
5May 23, 2024 07:3594,14663,692,74831,849,0002,985,0002,281,472
6May 23, 2024 07:3594,16263,787,14332,850,0001,990,0002,281,472
7May 23, 2024 07:3594,21165,948,85130,875,0003,983,0002,281,472
8May 23, 2024 07:3594,33058,573,03632,908,0001,994,0002,342,912
9May 23, 2024 07:3594,87359,566,10630,089,0005,014,0002,281,472
10May 23, 2024 07:3597,20595,827,27435,966,00102,232,320
11May 23, 2024 07:3597,224101,929,59335,973,03102,232,320
12May 23, 2024 07:3597,476107,753,43336,065,95002,371,584