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 18, 2023 12:50mmalczakmmalczakScore: 84,073Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 18, 2023 12:5083,35160,619,78728,851,0001,989,0002,281,472
2Sep 18, 2023 12:5083,42260,639,30728,875,0001,991,0002,265,088
3Sep 18, 2023 12:5083,42757,382,81829,873,000995,0002,289,664
4Sep 18, 2023 12:5083,42757,611,22929,873,000995,0002,289,664
5Sep 18, 2023 12:5083,58955,464,28928,933,0001,995,0002,289,664
6Sep 18, 2023 12:5083,86252,916,40729,028,0002,001,0002,289,664
7Sep 18, 2023 12:5084,07365,266,78529,101,0002,006,0002,289,664
8Sep 18, 2023 12:5084,73254,066,26329,329,0002,022,0002,289,664
9Sep 18, 2023 12:5084,94952,995,41629,404,0002,027,0002,289,664
10Sep 18, 2023 12:5085,66798,924,64731,696,90002,269,184
11Sep 18, 2023 12:5085,84693,668,32831,762,99402,269,184
12Sep 18, 2023 12:5086,695108,296,76732,076,97202,260,992