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 15:56mmalczakmmalczakScore: 98,586Success
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 15:5897,34158,273,63834,016,0002,000,0002,289,664
2Sep 16, 2023 15:5697,36561,230,59634,024,0002,001,0002,269,184
3Sep 16, 2023 15:5697,50362,678,87734,072,0002,004,0002,527,232
4Sep 16, 2023 15:5897,61462,918,78235,114,0001,003,0002,277,376
5Sep 16, 2023 15:5697,65761,046,44634,126,0002,007,0002,289,664
6Sep 16, 2023 15:5897,85461,859,20034,195,0002,011,0002,289,664
7Sep 16, 2023 15:5897,94662,401,05235,234,0001,006,0002,289,664
8Sep 16, 2023 15:5697,99763,941,20434,245,0002,014,0002,289,664
9Sep 16, 2023 15:5898,24363,530,58135,341,0001,009,0002,531,328
10Sep 16, 2023 15:5698,25762,693,00634,336,0002,019,0002,265,088
11Sep 16, 2023 15:5698,47356,771,74835,423,0001,012,0002,531,328
12Sep 16, 2023 15:5698,54964,276,56636,463,00002,269,184
13Sep 16, 2023 15:5898,58660,638,45135,464,0001,013,0002,289,664
14Sep 16, 2023 15:5698,70360,023,31135,506,0001,014,0002,265,088
15Sep 16, 2023 15:5898,91966,035,94935,584,0001,016,0002,289,664
16Sep 16, 2023 15:5699,213105,914,61836,708,88102,265,088
17Sep 16, 2023 15:5899,21461,800,09135,690,0001,019,0002,289,664
18Sep 16, 2023 15:5699,331100,865,96836,752,36802,273,280
19Sep 16, 2023 15:5899,54594,361,86736,831,58902,260,992
20Sep 16, 2023 15:5899,66263,764,91934,882,0001,993,0002,277,376
21Sep 16, 2023 15:5699,70863,622,25334,898,0001,994,0002,289,664
22Sep 16, 2023 15:58100,345112,811,31837,127,72002,265,088
23Sep 16, 2023 15:58100,391107,360,73837,144,72002,265,088
24Sep 16, 2023 15:56100,699110,823,34637,258,45102,273,280