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 listJul 13, 2021 16:53Andrey TsvetkovAndrey TsvetkovError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 13, 2021 16:5500000Error: expected "429496471188 ", got "399431737015 "
2Jul 13, 2021 16:5697,86895,546,87736,211,20402,199,552
3Jul 13, 2021 16:5397,954100,990,74236,243,10302,211,840
4Jul 13, 2021 16:5698,015100,359,82036,265,59902,191,360
5Jul 13, 2021 16:5398,09993,219,79336,296,77002,207,744
6Jul 13, 2021 16:5698,359103,034,52436,392,74802,195,456
7Jul 13, 2021 16:5398,541100,099,77936,460,13202,203,648