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 listSep 20, 2023 20:06mmalczakmmalczakScore: 107,870Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 20, 2023 20:0685,59888,987,06631,671,16902,273,280
2Sep 20, 2023 20:0685,62896,905,63531,682,36602,256,896
3Sep 20, 2023 20:0686,19091,752,29831,890,14802,269,184
4Sep 20, 2023 20:06107,23064,842,27338,658,0001,017,0002,289,664
5Sep 20, 2023 20:06107,67866,083,12837,849,0001,992,0002,289,664
6Sep 20, 2023 20:06107,70063,596,80338,853,000996,0002,289,664
7Sep 20, 2023 20:06107,87063,089,61637,917,0001,995,0002,289,664
8Sep 20, 2023 20:06107,93262,919,91137,939,0001,996,0002,289,664
9Sep 20, 2023 20:06108,39561,540,21038,101,0002,005,0002,379,776
10Sep 20, 2023 20:06108,39769,019,09739,105,0001,002,0002,289,664
11Sep 20, 2023 20:06108,55764,137,11738,158,0002,008,0002,527,232
12Sep 20, 2023 20:06109,07670,590,04038,341,0002,017,0002,289,664