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 11:22Andrey TsvetkovAndrey TsvetkovScore: 102,303Success
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 11:22100,68659,022,42334,234,0003,020,0002,527,232
2Jul 13, 2021 11:22100,70866,620,72334,241,0003,021,0002,334,720
3Jul 13, 2021 11:22101,19258,992,75236,430,0001,011,0002,519,040
4Jul 13, 2021 11:22101,34364,093,42235,471,0002,026,0002,334,720
5Jul 13, 2021 11:22101,38659,953,52035,486,0002,027,0002,523,136
6Jul 13, 2021 11:22101,41963,509,12135,497,0002,028,0002,527,232
7Jul 13, 2021 11:22102,30365,241,33135,860,0001,992,0002,527,232
8Jul 13, 2021 11:22102,33062,929,60735,870,0001,992,0002,334,720
9Jul 13, 2021 11:22102,54364,003,61935,945,0001,996,0002,531,328
10Jul 13, 2021 11:22104,09395,725,29438,514,34902,203,648
11Jul 13, 2021 11:22104,10099,954,82638,517,15702,195,456
12Jul 13, 2021 11:22104,191106,954,86338,550,60202,199,552