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 18:30mmalczakmmalczakScore: 73,154Success
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 18:3070,50348,150,21925,083,0001,003,0002,437,120
2Sep 28, 2023 18:3070,60347,604,77625,119,0001,004,0002,424,832
3Sep 28, 2023 18:3071,75447,611,36926,549,00002,273,280
4Sep 28, 2023 18:3071,93553,759,45325,593,0001,023,0002,535,424
5Sep 28, 2023 18:3072,68151,450,21024,900,0001,992,0002,519,040
6Sep 28, 2023 18:3072,98148,633,74826,003,0001,000,0002,433,024
7Sep 28, 2023 18:3073,15448,361,18926,065,0001,002,0002,428,928
8Sep 28, 2023 18:3073,80053,954,98327,306,00002,535,424
9Sep 28, 2023 18:3073,86283,146,36327,329,08902,293,760
10Sep 28, 2023 18:3075,06685,390,45027,774,53002,281,472
11Sep 28, 2023 18:3075,66554,114,53326,997,000999,0002,273,280
12Sep 28, 2023 18:3078,20587,882,33528,935,66702,285,568