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:06mmalczakmmalczakScore: 99,157Success
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:0697,71957,654,75534,148,0002,008,0002,269,184
2Sep 16, 2023 12:0697,72460,978,91235,154,0001,004,0002,281,472
3Sep 16, 2023 12:0698,03558,802,73834,258,0002,015,0002,269,184
4Sep 16, 2023 12:0698,05763,986,07034,266,0002,015,0002,289,664
5Sep 16, 2023 12:0698,41659,091,99935,403,0001,011,0002,289,664
6Sep 16, 2023 12:0698,50065,596,66636,445,00002,289,664
7Sep 16, 2023 12:0699,15762,455,43635,669,0001,019,0002,289,664
8Sep 16, 2023 12:0699,57365,173,24234,851,0001,991,0002,379,776
9Sep 16, 2023 12:0699,864111,486,40136,949,55002,260,992
10Sep 16, 2023 12:06100,13563,567,08436,049,0001,001,0002,289,664
11Sep 16, 2023 12:06100,393105,802,30837,145,40302,265,088
12Sep 16, 2023 12:06115,091108,230,22042,583,56402,265,088