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 29, 2023 19:07mmalczakmmalczakScore: 69,873Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Nov 4, 2023 19:0869,16852,846,22425,592,00002,535,424
2Sep 29, 2023 19:0769,25753,677,59125,625,00002,428,928
3Nov 4, 2023 19:0869,27850,365,69725,633,00002,428,928
4Nov 4, 2023 19:0869,35153,504,39725,660,00002,535,424
5Nov 4, 2023 19:0869,40054,419,83724,651,0001,027,0002,535,424
6Sep 29, 2023 19:0769,45453,436,26425,698,00002,273,280
7Nov 4, 2023 19:0869,51148,056,41324,691,0001,028,0002,535,424
8Sep 29, 2023 19:0769,53851,702,68425,729,00002,535,424
9Nov 4, 2023 19:0869,71450,081,09923,810,0001,984,0002,433,024
10Sep 29, 2023 19:0769,78151,146,64724,826,000993,0002,535,424
11Sep 29, 2023 19:0769,86251,567,12825,849,00002,535,424
12Sep 29, 2023 19:0769,86851,881,37324,857,000994,0002,535,424
13Nov 4, 2023 19:0869,87350,664,56024,859,000994,0002,535,424
14Sep 29, 2023 19:0769,88948,047,35824,865,000994,0002,433,024
15Sep 29, 2023 19:0769,90048,864,90724,869,000994,0002,420,736
16Sep 29, 2023 19:0769,91450,668,41423,879,0001,989,0002,535,424
17Nov 4, 2023 19:0869,92752,805,88724,878,000995,0002,514,944
18Nov 4, 2023 19:0869,95752,520,03324,889,000995,0002,535,424
19Sep 29, 2023 19:0772,30984,039,28226,754,19002,273,280
20Nov 4, 2023 19:0872,38494,787,66226,782,23302,293,760
21Sep 29, 2023 19:0772,46784,750,53426,812,76102,293,760
22Nov 4, 2023 19:0872,49585,154,94726,823,29102,281,472
23Sep 29, 2023 19:0772,64188,223,47226,877,07302,285,568
24Nov 4, 2023 19:0872,657108,614,92326,883,25102,285,568