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 listAug 6, 2022 19:28Franek KortaFranek KortaScore: 74,043Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Mar 31, 2023 17:5373,50849,936,18426,191,0001,007,0002,269,184
2Aug 6, 2022 19:2873,56850,076,53425,204,0002,016,0002,281,472
3Mar 31, 2023 17:5373,61452,410,19025,220,0002,017,0002,281,472
4Aug 6, 2022 19:2873,72249,455,82524,247,0003,030,0002,277,376
5Aug 6, 2022 19:2873,78448,886,57525,278,0002,022,0002,281,472
6Mar 31, 2023 17:5373,79752,217,30625,283,0002,022,0002,383,872
7Mar 31, 2023 17:5373,85449,992,98926,314,0001,012,0002,273,280
8Mar 31, 2023 17:5373,87347,517,92126,321,0001,012,0002,281,472
9Aug 6, 2022 19:2873,93249,622,17425,329,0002,026,0002,535,424
10Aug 6, 2022 19:2873,98654,508,44525,348,0002,027,0002,281,472
11Aug 6, 2022 19:2873,98959,308,68125,349,0002,027,0002,281,472
12Mar 31, 2023 17:5374,01951,112,36924,344,0003,043,0002,281,472
13Aug 6, 2022 19:2874,04355,257,26124,352,0003,044,0002,281,472
14Aug 6, 2022 19:2874,07853,331,54226,394,0001,015,0002,281,472
15Mar 31, 2023 17:5374,17661,247,01526,429,0001,016,0002,281,472
16Mar 31, 2023 17:5374,17850,915,89126,430,0001,016,0002,273,280
17Aug 6, 2022 19:2874,19749,303,09826,437,0001,016,0002,281,472
18Mar 31, 2023 17:5374,24649,425,63026,454,0001,017,0002,527,232
19Mar 31, 2023 17:5377,62595,605,67828,721,08602,260,992
20Mar 31, 2023 17:5377,78994,070,02428,782,04302,260,992
21Aug 6, 2022 19:2877,88395,711,10528,816,64502,256,896
22Aug 6, 2022 19:2877,96491,922,32328,846,78102,265,088
23Aug 6, 2022 19:2878,002105,339,91328,860,85402,260,992
24Mar 31, 2023 17:5378,07990,140,91728,889,35102,256,896