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 16, 2023 17:06mmalczakmmalczakScore: 84,243Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 16, 2023 17:0682,75461,141,04529,599,0001,020,0002,289,664
2Sep 16, 2023 17:0682,87856,618,57229,643,0001,022,0002,289,664
3Sep 16, 2023 17:0682,95758,875,38629,671,0001,023,0002,289,664
4Sep 16, 2023 17:0683,35960,223,28528,854,0001,989,0002,289,664
5Sep 16, 2023 17:0683,37355,700,04529,853,000995,0002,289,664
6Sep 16, 2023 17:0683,41956,097,14828,874,0001,991,0002,531,328
7Sep 16, 2023 17:0683,41955,624,81729,870,000995,0002,289,664
8Sep 16, 2023 17:0683,55158,998,93329,917,000997,0002,289,664
9Sep 16, 2023 17:0683,65154,509,56028,955,0001,996,0002,289,664
10Sep 16, 2023 17:0683,82256,564,96829,014,0002,000,0002,289,664
11Sep 16, 2023 17:0684,00354,243,25130,079,0001,002,0002,273,280
12Sep 16, 2023 17:0684,20351,424,31129,145,0002,010,0002,289,664
13Sep 16, 2023 17:0684,24357,975,99930,165,0001,005,0002,289,664
14Sep 16, 2023 17:0684,26556,551,05529,167,0002,011,0002,289,664
15Sep 16, 2023 17:0684,40858,229,60229,217,0002,014,0002,289,664
16Sep 16, 2023 17:0684,53055,270,17630,268,0001,008,0002,289,664
17Sep 16, 2023 17:0684,57354,286,43829,274,0002,018,0002,265,088
18Sep 16, 2023 17:0685,07988,968,96031,479,23502,273,280
19Sep 16, 2023 17:0685,487112,892,40531,630,03802,265,088
20Sep 16, 2023 17:0685,71198,480,82131,713,11802,269,184
21Sep 16, 2023 17:0685,712107,805,88231,713,33802,273,280
22Sep 16, 2023 17:0686,08894,345,35631,852,45702,265,088
23Sep 16, 2023 17:0686,12258,078,61929,874,0001,991,0002,531,328
24Sep 16, 2023 17:0686,423102,903,02631,976,45102,256,896