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:32Maxim ElchuginMaxim ElchuginScore: 117,162Success
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:32115,01164,756,18241,541,0001,013,0002,281,472
2May 23, 2024 07:32116,16870,073,17640,983,0001,999,0002,281,472
3May 23, 2024 07:32116,58165,720,73643,135,00002,502,656
4May 23, 2024 07:32116,60066,010,56943,142,00002,281,472
5May 23, 2024 07:32116,68666,064,26742,170,0001,004,0002,510,848
6May 23, 2024 07:32117,02268,779,90340,278,0003,020,0002,347,008
7May 23, 2024 07:32117,16268,924,97841,334,0002,016,0002,281,472
8May 23, 2024 07:32117,76271,415,49542,559,0001,013,0002,510,848
9May 23, 2024 07:32117,95469,320,17642,629,0001,014,0002,342,912
10May 23, 2024 07:32120,041106,680,63544,415,34802,236,416
11May 23, 2024 07:32120,838113,045,46644,710,13402,232,320
12May 23, 2024 07:32121,193106,724,85944,841,51202,240,512