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 29, 2024 18:45Joad 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 29, 2024 18:4500000Error: expected "429496475622 ", got "416611588616 "stderr
2Nov 29, 2024 18:4500000Error: expected "429496464609 ", got "399431729420 "stderr
3Nov 29, 2024 18:4500000Error: expected "429496460291 ", got "399431724477 "stderr
4Nov 29, 2024 18:4557,73244,939,44120,344,0001,017,0002,428,928
5Nov 29, 2024 18:4557,83849,929,98220,381,0001,019,0002,269,184
6Nov 29, 2024 18:4558,00344,275,14421,461,00002,433,024
7Nov 29, 2024 18:4558,01948,949,95521,467,00002,433,024
8Nov 29, 2024 18:4558,01939,082,93721,467,00002,433,024
9Nov 29, 2024 18:4558,02445,015,70321,469,00002,433,024
10Nov 29, 2024 18:4558,03248,056,65621,472,00002,428,928
11Nov 29, 2024 18:4558,03542,861,75621,473,00002,424,832
12Nov 29, 2024 18:4558,03844,899,59221,474,00002,531,328
13Nov 29, 2024 18:4558,04651,116,26220,501,000976,0002,531,328
14Nov 29, 2024 18:4558,05144,746,43621,479,00002,428,928
15Nov 29, 2024 18:4558,09748,912,06821,496,00002,437,120
16Nov 29, 2024 18:4558,10843,634,22120,477,0001,023,0002,269,184
17Nov 29, 2024 18:4558,11943,947,21821,504,00002,428,928
18Nov 29, 2024 18:4558,21442,648,84921,539,00002,531,328
19Nov 29, 2024 18:4558,22745,479,15621,544,00002,433,024
20Nov 29, 2024 18:4558,24146,053,45521,549,00002,531,328
21Nov 29, 2024 18:4558,27848,212,56621,563,00002,428,928
22Nov 29, 2024 18:4558,28144,924,96521,564,00002,428,928
23Nov 29, 2024 18:4558,33247,949,84920,556,0001,027,0002,433,024
24Nov 29, 2024 18:4558,49750,440,24821,644,00002,428,928
25Nov 29, 2024 18:4559,05946,152,30219,866,0001,986,0002,437,120
26Nov 29, 2024 18:4560,36549,545,02620,305,0002,030,0002,424,832
27Nov 29, 2024 18:4560,45149,020,66821,351,0001,016,0002,433,024