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 17:42Joad 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 17:4200000Error: expected "429496521870 ", got "429496519272 "stderr
2Nov 28, 2024 17:4200000Error: expected "429496446270 ", got "386546825509 "stderr
3Nov 28, 2024 17:4200000Error: expected "429496440474 ", got "403726667298 "stderr
4Nov 28, 2024 17:4259,49743,440,32921,014,0001,000,0002,428,928
5Nov 28, 2024 17:4259,62244,505,69721,058,0001,002,0002,433,024
6Nov 28, 2024 17:4259,62444,681,55221,059,0001,002,0002,531,328
7Nov 28, 2024 17:4259,65940,740,77720,068,0002,006,0002,510,848
8Nov 28, 2024 17:4259,68650,425,74721,081,0001,003,0002,433,024
9Nov 28, 2024 17:4259,69244,436,16821,083,0001,003,0002,531,328
10Nov 28, 2024 17:4259,69750,227,79520,080,0002,008,0002,441,216
11Nov 28, 2024 17:4259,73843,948,91021,099,0001,004,0002,428,928
12Nov 28, 2024 17:4259,77044,229,65721,110,0001,005,0002,531,328
13Nov 28, 2024 17:4259,88645,742,47120,144,0002,014,0002,433,024
14Nov 28, 2024 17:4259,91649,082,70521,162,0001,007,0002,531,328
15Nov 28, 2024 17:4260,07349,475,38121,217,0001,010,0002,437,120