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:20Andrey TsvetkovAndrey TsvetkovScore: 103,119Success
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:20100,52262,682,35735,183,0002,010,0002,523,136
2Jul 13, 2021 11:20100,72260,992,48834,246,0003,021,0002,334,720
3Jul 13, 2021 11:20101,33058,916,64136,479,0001,013,0002,334,720
4Jul 13, 2021 11:20101,34157,736,12135,470,0002,026,0002,334,720
5Jul 13, 2021 11:20101,69265,228,94435,593,0002,033,0002,523,136
6Jul 13, 2021 11:20102,29561,383,64535,857,0001,992,0002,523,136
7Jul 13, 2021 11:20103,119107,922,50238,154,06702,203,648
8Jul 13, 2021 11:20103,455109,662,95438,278,49802,199,552
9Jul 13, 2021 11:20104,19199,181,03238,550,74202,211,840
10Jul 13, 2021 11:20111,60366,719,16838,272,0003,021,0002,519,040
11Jul 13, 2021 11:20765,7841,848,867,67937,227,000246,113,000266,997,760
12Jul 13, 2021 11:20770,9301,868,995,50940,016,000245,228,000267,632,640