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 12:11mmalczakmmalczakScore: 109,576Success
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 12:11108,45165,791,97838,121,0002,006,0002,289,664
2Sep 16, 2023 12:11108,60366,405,75738,174,0002,009,0002,273,280
3Sep 16, 2023 12:11108,67863,281,31238,201,0002,010,0002,269,184
4Sep 16, 2023 12:11108,71962,683,86138,215,0002,011,0002,531,328
5Sep 16, 2023 12:11108,75962,665,50638,229,0002,012,0002,289,664
6Sep 16, 2023 12:11109,15463,832,39639,378,0001,009,0002,289,664
7Sep 16, 2023 12:11109,57662,005,95339,530,0001,013,0002,269,184
8Sep 16, 2023 12:11109,71965,626,67939,582,0001,014,0002,289,664
9Sep 16, 2023 12:11109,73268,162,08439,586,0001,015,0002,273,280
10Sep 16, 2023 12:11111,817120,434,44441,372,22702,273,280
11Sep 16, 2023 12:11112,094120,989,09341,474,90502,265,088
12Sep 16, 2023 12:11112,88599,189,68541,767,35402,265,088