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 listOct 14, 2024 18:04Joad 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
1Oct 14, 2024 18:0200000Error: expected "429496629143 ", got "429496627927 "stderr
2Oct 14, 2024 18:0400000Error: expected "429496505817 ", got "425201543492 "stderr
3Oct 14, 2024 18:0400000Error: expected "429496476812 ", got "390841817106 "stderr
4Oct 14, 2024 18:0461,90544,085,40920,914,0001,991,0002,273,280
5Oct 14, 2024 18:0462,05943,376,30020,966,0001,996,0002,273,280
6Oct 14, 2024 18:0462,14952,252,99721,996,000999,0002,433,024