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 11, 2021 07:26Sergey StreminSergey StreminError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 11, 2021 07:4200000Error: expected "429496447554 ", got "416611561704 "stderr
2Sep 11, 2021 07:4000000Error: expected "429496438961 ", got "403726668097 "stderr
3Sep 11, 2021 07:2697,40566,436,95634,038,0002,002,0002,498,560
4Sep 11, 2021 07:2697,77857,691,63135,174,0001,004,0002,498,560
5Sep 11, 2021 07:2698,69563,507,72135,503,0001,014,0002,498,560
6Sep 11, 2021 07:2698,83565,911,93135,554,0001,015,0002,281,472
7Sep 11, 2021 07:4198,935102,005,78936,605,84702,199,552
8Sep 11, 2021 07:2698,99265,018,89335,610,0001,017,0002,506,752
9Sep 11, 2021 07:2699,326106,429,23136,750,59502,260,992
10Sep 11, 2021 07:2699,41887,990,45036,784,56902,207,744
11Sep 11, 2021 07:2699,63262,090,55235,868,000996,0002,490,368
12Sep 11, 2021 07:2699,633109,344,35036,864,19802,207,744
13Sep 11, 2021 07:2699,65763,924,28535,877,000996,0002,285,568
14Sep 11, 2021 07:4199,807107,208,88136,928,45802,220,032
15Sep 11, 2021 07:2699,84967,226,13835,946,000998,0002,285,568
16Sep 11, 2021 07:2699,87664,712,52435,956,000998,0002,355,200
17Sep 11, 2021 07:41100,016116,870,33137,005,96002,203,648