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 28, 2023 17:14mmalczakmmalczakScore: 69,941Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 28, 2023 17:1469,17855,473,36825,596,00002,273,280
2Sep 28, 2023 17:1469,19550,905,47025,602,00002,424,832
3Sep 28, 2023 17:1469,40052,127,55725,678,00002,420,736
4Sep 28, 2023 17:1469,85450,992,50625,846,00002,428,928
5Sep 28, 2023 17:1469,86854,619,17424,857,000994,0002,519,040
6Sep 28, 2023 17:1469,90050,120,20224,869,000994,0002,535,424
7Sep 28, 2023 17:1469,94153,856,61924,883,000995,0002,535,424
8Sep 28, 2023 17:1469,95450,770,71823,892,0001,991,0002,535,424
9Sep 28, 2023 17:1470,07344,299,96523,933,0001,994,0002,535,424
10Sep 28, 2023 17:1472,57790,284,86326,853,46702,281,472
11Sep 28, 2023 17:1472,65674,629,71926,882,55802,289,664
12Sep 28, 2023 17:1472,67095,876,37926,887,78702,289,664