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:23Maxim ElchuginMaxim ElchuginScore: 94,249Success
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:2393,02459,225,56132,395,0002,024,0002,519,040
2May 23, 2024 07:2393,07861,560,16132,414,0002,025,0002,281,472
3May 23, 2024 07:2393,20559,860,02632,458,0002,028,0002,281,472
4May 23, 2024 07:2393,28657,003,72132,486,0002,030,0002,514,944
5May 23, 2024 07:2393,65461,467,41132,614,0002,038,0002,289,664
6May 23, 2024 07:2394,00359,180,85732,794,0001,987,0002,281,472
7May 23, 2024 07:2394,24960,907,30831,883,0002,989,0002,289,664
8May 23, 2024 07:2394,31456,667,82832,902,0001,994,0002,289,664
9May 23, 2024 07:2394,33057,452,47232,908,0001,994,0002,281,472
10May 23, 2024 07:2396,990117,488,55835,886,46302,236,416
11May 23, 2024 07:2397,825106,644,72236,195,07702,224,128
12May 23, 2024 07:2398,413100,836,56036,412,74002,240,512