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:24Joad 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:2300000Error: expected "429496462750 ", got "425201500448 "stderr
2Nov 28, 2024 18:2300000Error: expected "429496496598 ", got "403726722915 "stderr
3Nov 28, 2024 18:2400000Error: expected "429496540224 ", got "429496538797 "stderr
4Nov 28, 2024 18:2400000Error: expected "429496496701 ", got "429496493248 "stderr
5Nov 28, 2024 18:2600000Error: expected "429496423826 ", got "395136727046 "stderr
6Nov 28, 2024 18:2459,67347,169,11822,079,00002,428,928
7Nov 28, 2024 18:2459,75150,454,32420,099,0002,009,0002,531,328
8Nov 28, 2024 18:2459,84646,740,02720,130,0002,013,0002,510,848