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:06Joad 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:0600000Error: expected "429496476745 ", got "403726703181 "stderr
2Nov 28, 2024 17:1500000Error: expected "429496478962 ", got "403726705610 "stderr
3Oct 14, 2024 18:0661,77344,666,82522,856,00002,535,424
4Oct 14, 2024 18:0661,83252,587,05920,889,0001,989,0002,535,424
5Oct 14, 2024 18:0661,90044,807,41421,908,000995,0002,428,928