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:28Joad 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:3000000Error: expected "429496450416 ", got "390841790906 "stderr
2Nov 28, 2024 18:3000000Error: expected "429496434992 ", got "412316586579 "stderr
3Nov 28, 2024 18:3000000Error: expected "429496484367 ", got "399431749507 "stderr
4Nov 28, 2024 18:2800000Error: expected "429496443605 ", got "373661938449 "stderr
5Nov 28, 2024 18:2800000Error: expected "429496529740 ", got "429496526725 "stderr
6Nov 28, 2024 18:2800000Error: expected "429496439473 ", got "377956894420 "stderr
7Nov 28, 2024 18:2800000Error: expected "429496483719 ", got "399431748236 "stderr
8Nov 28, 2024 18:2859,37343,242,12520,970,000998,0002,424,832
9Nov 28, 2024 18:3059,46246,334,29521,001,0001,000,0002,269,184
10Nov 28, 2024 18:3059,47844,154,52321,007,0001,000,0002,433,024
11Nov 28, 2024 18:2859,54344,170,70121,030,0001,001,0002,531,328
12Nov 28, 2024 18:3059,55943,855,06221,036,0001,001,0002,531,328
13Nov 28, 2024 18:3059,57342,582,56621,041,0001,001,0002,531,328
14Nov 28, 2024 18:3059,57844,875,28421,042,0001,002,0002,420,736
15Nov 28, 2024 18:3059,61946,141,09521,057,0001,002,0002,531,328
16Nov 28, 2024 18:3059,63245,584,10721,062,0001,002,0002,531,328
17Nov 28, 2024 18:2859,64342,526,97921,065,0001,003,0002,510,848
18Nov 28, 2024 18:2859,65953,268,70721,071,0001,003,0002,531,328
19Nov 28, 2024 18:2859,67345,192,61921,076,0001,003,0002,531,328
20Nov 28, 2024 18:3059,68943,806,47020,078,0002,007,0002,437,120
21Nov 28, 2024 18:2859,73543,146,21921,098,0001,004,0002,531,328
22Nov 28, 2024 18:2859,74643,888,82121,102,0001,004,0002,424,832
23Nov 28, 2024 18:3059,74941,423,02821,103,0001,004,0002,433,024
24Nov 28, 2024 18:2859,88444,778,62821,150,0001,007,0002,428,928
25Nov 28, 2024 18:2859,89744,087,90521,155,0001,007,0002,428,928