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 2, 2023 22:57Franek KortaFranek KortaError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 2, 2023 22:5700000Error: expected "429496432670 ", got "399431703015"stderr
2Sep 2, 2023 22:5800000generator exited with code 1
3Sep 2, 2023 23:0264,98885,815,40624,045,62702,297,856
4Sep 2, 2023 23:0265,06781,477,10424,074,92202,297,856
5Sep 2, 2023 23:0265,28692,164,08224,155,89402,293,760