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 listJul 14, 2021 13:51Yuriy LyfenkoYuriy LyfenkoError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 14, 2021 14:0800000Error: expected "429496438778 ", got "429496439497 "
2Jul 14, 2021 13:5100000Error: expected "429496427964 ", got "429496430545 "
3Jul 14, 2021 14:0885,951556,634,55128,821,0002,981,0002,326,528
4Jul 14, 2021 14:0886,322559,026,80629,943,0001,996,0002,326,528
5Jul 14, 2021 13:5186,514557,512,56930,010,0002,000,0002,514,944
6Jul 14, 2021 14:0886,819560,002,10129,112,0003,011,0002,326,528
7Jul 14, 2021 14:0886,832553,592,44930,120,0002,008,0002,514,944
8Jul 14, 2021 14:0886,951556,736,30229,156,0003,016,0002,326,528
9Jul 14, 2021 13:5187,165556,524,82430,236,0002,015,0002,326,528
10Jul 14, 2021 13:5187,200596,231,90932,264,00302,252,800
11Jul 14, 2021 13:5187,343554,208,67629,288,0003,029,0002,510,848
12Jul 14, 2021 13:5187,352587,733,70832,320,22802,252,800
13Jul 14, 2021 13:5187,416558,997,55031,334,0001,010,0002,326,528
14Jul 14, 2021 13:5087,429594,072,76132,348,76902,252,800
15Jul 14, 2021 13:5087,444595,087,22932,354,18202,248,704
16Jul 14, 2021 14:0887,500555,969,24231,364,0001,011,0002,367,488
17Jul 14, 2021 13:5187,508552,478,27030,355,0002,023,0002,330,624
18Jul 14, 2021 14:0887,549550,745,95830,369,0002,024,0002,330,624
19Jul 14, 2021 14:0887,562552,047,43731,386,0001,012,0002,330,624
20Jul 14, 2021 13:5187,616553,170,76330,392,0002,026,0002,326,528
21Jul 14, 2021 14:0887,637585,465,28932,425,58002,248,704
22Jul 14, 2021 13:5087,688589,718,60332,444,69302,248,704
23Jul 14, 2021 13:5187,816561,076,95831,477,0001,015,0002,506,752
24Jul 14, 2021 14:0887,872587,607,78232,512,79502,252,800
25Jul 14, 2021 13:5187,886565,648,29829,562,0002,956,0002,326,528
26Jul 14, 2021 13:5187,943565,440,66830,506,0002,033,0002,330,624
27Jul 14, 2021 14:0888,559561,495,45629,789,0002,978,0002,326,528
28Jul 14, 2021 14:0888,610592,917,66132,785,88402,248,704
29Jul 14, 2021 13:5188,715596,561,61132,824,51502,301,952