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 18, 2021 22:02Andrey 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 18, 2021 22:0300000Error: expected "429496473171 ", got "395136777753"
2Jul 18, 2021 22:0284,88657,687,28330,395,0001,013,0002,306,048
3Jul 18, 2021 22:0284,90060,872,30630,400,0001,013,0002,301,952
4Jul 18, 2021 22:0284,96252,654,99429,408,0002,028,0002,301,952
5Jul 18, 2021 22:0284,99558,806,70529,420,0002,028,0002,342,912
6Jul 18, 2021 22:0285,29254,378,62929,522,0002,036,0002,342,912
7Jul 18, 2021 22:0285,41157,929,51429,564,0002,038,0002,293,760
8Jul 18, 2021 22:0286,08459,586,42830,856,000995,0002,330,624
9Jul 18, 2021 22:0286,08959,909,20029,863,0001,990,0002,342,912
10Jul 18, 2021 22:0286,14961,889,64129,883,0001,992,0002,318,336
11Jul 18, 2021 22:0288,46090,778,84432,730,05002,248,704
12Jul 18, 2021 22:0288,887101,211,79332,888,14102,252,800
13Jul 18, 2021 22:0289,426102,085,16533,087,51402,248,704