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:19Joad 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:1900000Error: expected "429496452740 ", got "416611565749 "stderr
2Nov 28, 2024 18:1900000Error: expected "429496444829 ", got "386546823976 "stderr
3Nov 28, 2024 18:1959,42446,938,81919,989,0001,998,0002,428,928
4Nov 28, 2024 18:1959,46545,216,38120,002,0002,000,0002,428,928
5Nov 28, 2024 18:1959,60046,698,19721,050,0001,002,0002,514,944
6Nov 28, 2024 18:1959,66848,222,91821,074,0001,003,0002,510,848
7Nov 28, 2024 18:1959,66840,968,27621,074,0001,003,0002,428,928
8Nov 28, 2024 18:1959,83545,329,06820,127,0002,012,0002,433,024
9Nov 28, 2024 18:1959,84642,314,36221,137,0001,006,0002,428,928
10Nov 28, 2024 18:1959,88644,170,67020,144,0002,014,0002,433,024
11Nov 28, 2024 18:1960,30044,163,76120,283,0002,028,0002,428,928