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 25, 2023 21:55mmalczakmmalczakError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 25, 2023 22:0100000Error: expected "429496506968 ", got "429496506961 "
2Sep 25, 2023 22:0473,91192,653,06027,347,10402,260,992
3Sep 25, 2023 21:5573,972113,607,23427,369,59402,265,088
4Sep 25, 2023 21:5573,97797,540,50727,371,54702,273,280
5Sep 25, 2023 22:0274,01999,633,54627,387,14802,277,376
6Sep 25, 2023 22:0274,06796,275,80627,404,94802,260,992
7Sep 25, 2023 22:0274,06880,541,38427,405,21902,265,088
8Sep 25, 2023 22:0374,20591,244,47827,455,78502,265,088
9Sep 25, 2023 22:0374,23592,644,44127,466,95702,260,992
10Sep 25, 2023 22:0474,31496,871,87927,496,15902,260,992
11Sep 25, 2023 21:5574,386107,677,23127,522,83602,269,184
12Sep 25, 2023 22:0374,47891,655,04527,556,98602,265,088
13Sep 25, 2023 22:0474,84289,716,70427,691,66802,260,992