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 listMay 7, 2024 00:56Joad NacerJoad NacerError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 7, 2024 00:5600000Error: expected "429496449809 ", got "360777055834 "
2May 7, 2024 00:5700000Error: expected "429496453220 ", got "377956907701 "
3May 7, 2024 00:5700000Error: expected "429496479299 ", got "403726705851 "
4May 7, 2024 00:5768,92880,559,07625,503,40202,265,088
5May 7, 2024 00:5769,08797,732,57825,562,07302,269,184
6May 7, 2024 00:5769,59498,513,67425,749,61902,273,280