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 19:59mmalczakmmalczakScore: 101,684Success
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 19:5985,676107,963,53331,700,08702,252,800
2Sep 20, 2023 19:5986,535119,268,10332,017,80302,265,088
3Sep 20, 2023 19:5987,426100,338,53332,347,55502,260,992
4Sep 20, 2023 19:59100,01462,122,38135,005,0002,000,0002,289,664
5Sep 20, 2023 19:59100,83264,238,20635,292,0002,016,0002,273,280
6Sep 20, 2023 19:59101,51660,214,98836,546,0001,015,0002,277,376
7Sep 20, 2023 19:59101,68467,169,62136,607,0001,016,0002,531,328
8Sep 20, 2023 19:59101,89571,338,16936,683,0001,018,0002,289,664
9Sep 20, 2023 19:59102,26263,555,29635,846,0001,991,0002,277,376
10Sep 20, 2023 19:59102,30364,027,07136,856,000996,0002,273,280
11Sep 20, 2023 19:59103,21662,818,36736,180,0002,010,0002,289,664
12Sep 20, 2023 19:59106,20562,175,95337,281,0002,015,0002,371,584