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 listNov 28, 2024 18:20Joad 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
1Nov 28, 2024 18:2000000Error: expected "429496447939 ", got "377956903027 "stderr
2Nov 28, 2024 18:2000000Error: expected "429496488581 ", got "412316639289 "stderr
3Nov 28, 2024 18:2000000Error: expected "429496461028 ", got "403726687640 "stderr
4Nov 28, 2024 18:2000000Error: expected "429496482089 ", got "425201519736 "stderr
5Nov 28, 2024 18:2059,44144,892,70620,994,000999,0002,433,024
6Nov 28, 2024 18:2059,52243,644,45421,022,0001,001,0002,269,184
7Nov 28, 2024 18:2059,75145,695,49621,104,0001,004,0002,428,928