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 listSep 28, 2023 16:47apuxbtapuxbtError
Source Code

Source code access is restricted. Log in to request access.

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 28, 2023 17:0500000Error: expected "429496462857 ", got "412316613555 "stderr
2Sep 28, 2023 17:0500000Error: expected "429496476681 ", got "416475512909 "stderr
3Sep 28, 2023 17:0500000Error: expected "429496446889 ", got "395363361839 "stderr
4Sep 28, 2023 17:0500000Error: expected "429496463153 ", got "416611576171 "stderr
5Sep 28, 2023 16:4773,17049,425,35425,068,0002,005,0002,531,328
6Sep 28, 2023 16:4773,22450,798,09125,087,0002,006,0002,531,328
7Sep 28, 2023 16:4773,30849,719,39025,115,0002,009,0002,523,136
8Sep 28, 2023 16:4773,39552,494,96625,145,0002,011,0002,527,232
9Sep 28, 2023 16:4773,44949,864,84325,163,0002,013,0002,293,760
10Sep 28, 2023 16:4773,85149,795,61025,301,0002,024,0002,293,760
11Sep 28, 2023 16:4773,87354,309,06925,309,0002,024,0002,293,760
12Sep 28, 2023 16:4773,98949,997,02125,349,0002,027,0002,281,472
13Sep 28, 2023 16:4774,05953,655,38326,388,0001,014,0002,379,776
14Sep 28, 2023 16:4776,55993,302,93028,326,87602,269,184
15Sep 28, 2023 17:0576,60396,713,27728,343,23202,269,184
16Sep 28, 2023 16:4776,60690,940,42028,344,23502,256,896
17Sep 28, 2023 17:0576,79188,808,58928,412,85402,269,184
18Sep 28, 2023 16:4776,79291,235,27028,413,03202,260,992
19Sep 28, 2023 17:0576,958107,806,65628,474,39902,281,472
20Sep 28, 2023 17:0577,20488,532,89428,565,47902,260,992
21Sep 28, 2023 17:0577,82987,000,21228,796,75902,269,184
22Sep 28, 2023 17:0579,876102,866,33929,554,03302,260,992