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 14, 2021 10:12Andrey 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 14, 2021 10:1200000Error: expected "429496478631 ", got "425201516356 "
2Jul 14, 2021 13:5088,18885,800,65232,629,65902,187,264
3Jul 14, 2021 13:5188,27495,369,15232,661,33402,174,976
4Jul 14, 2021 10:1388,27587,111,45832,661,64002,183,168
5Jul 14, 2021 14:2488,45895,118,80132,729,38902,187,264
6Jul 14, 2021 10:1388,46898,813,63732,733,25002,183,168
7Jul 14, 2021 13:5088,519108,167,56332,751,91302,179,072
8Jul 14, 2021 13:5188,64098,645,89932,796,90402,306,048
9Jul 14, 2021 14:2488,71391,682,10132,823,66602,183,168
10Jul 15, 2021 10:3888,84288,016,17632,871,43102,301,952
11Jul 15, 2021 10:3889,03294,675,41332,941,83002,187,264
12Jul 14, 2021 13:5089,139102,510,06832,981,25502,183,168
13Jul 14, 2021 14:2489,22367,024,69433,012,48202,179,072
14Jul 14, 2021 13:5189,273108,982,85933,031,16402,183,168
15Jul 14, 2021 10:1389,464123,328,36833,101,75702,183,168
16Jul 15, 2021 10:3889,802106,796,71333,226,66502,179,072