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 16, 2023 12:09mmalczakmmalczakScore: 109,538Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 16, 2023 12:09108,50364,058,44838,139,0002,007,0002,265,088
2Sep 16, 2023 12:09108,52463,220,31738,147,0002,007,0002,273,280
3Sep 16, 2023 12:09108,52464,627,60538,147,0002,007,0002,289,664
4Sep 16, 2023 12:09108,53569,062,52838,151,0002,007,0002,277,376
5Sep 16, 2023 12:09108,61161,890,00038,177,0002,009,0002,273,280
6Sep 16, 2023 12:09108,61467,439,71039,183,0001,004,0002,289,664
7Sep 16, 2023 12:09108,62262,708,25138,181,0002,009,0002,269,184
8Sep 16, 2023 12:09108,73563,941,37138,221,0002,011,0002,289,664
9Sep 16, 2023 12:09108,78460,478,32138,238,0002,012,0002,289,664
10Sep 16, 2023 12:09108,83264,626,50838,255,0002,013,0002,289,664
11Sep 16, 2023 12:09108,90362,196,23738,280,0002,014,0002,277,376
12Sep 16, 2023 12:09109,01167,002,33438,318,0002,016,0002,273,280
13Sep 16, 2023 12:09109,53864,893,29739,516,0001,013,0002,273,280
14Sep 16, 2023 12:09109,66264,272,10739,561,0001,014,0002,273,280
15Sep 16, 2023 12:09109,69767,610,33439,574,0001,014,0002,289,664
16Sep 16, 2023 12:09109,82466,480,43340,635,00002,269,184
17Sep 16, 2023 12:09109,94365,533,80038,695,0001,984,0002,289,664
18Sep 16, 2023 12:09111,795112,965,10041,363,98302,265,088
19Sep 16, 2023 12:09111,947102,798,41141,420,26402,260,992
20Sep 16, 2023 12:09112,192109,100,61641,511,04502,269,184
21Sep 16, 2023 12:09112,792111,788,26041,732,99202,256,896
22Sep 16, 2023 12:09112,943112,061,27241,788,88002,269,184
23Sep 16, 2023 12:09123,124119,827,99245,555,99402,269,184
24Sep 16, 2023 12:09132,87871,058,85747,159,0002,006,0002,396,160