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 16:45mmalczakmmalczakScore: 145,124Success
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 16:45129,537118,132,40247,928,79802,269,184
2Sep 16, 2023 16:45129,736130,982,11048,002,31702,269,184
3Sep 16, 2023 16:45129,784100,563,95948,019,93302,256,896
4Sep 16, 2023 16:44129,784109,587,46048,019,96502,260,992
5Sep 16, 2023 16:44129,857104,919,15048,047,25702,260,992
6Sep 16, 2023 16:45130,478124,405,87548,276,71802,269,184
7Sep 16, 2023 16:45130,938114,250,53748,447,20702,265,088
8Sep 16, 2023 16:45131,290104,442,39248,577,29702,260,992
9Sep 16, 2023 16:44134,438111,141,91649,741,94602,269,184
10Sep 16, 2023 16:44140,20374,888,22049,880,0001,995,0002,273,280
11Sep 16, 2023 16:44140,22775,706,05351,884,00002,289,664
12Sep 16, 2023 16:45143,07676,977,91850,941,0001,997,0002,269,184
13Sep 16, 2023 16:45143,19579,571,38750,983,0001,999,0002,289,664
14Sep 16, 2023 16:44143,39276,882,99453,055,00002,527,232
15Sep 16, 2023 16:45143,93576,040,81851,247,0002,009,0002,269,184
16Sep 16, 2023 16:45144,38975,724,14853,424,00002,277,376
17Sep 16, 2023 16:45144,82780,376,06252,575,0001,011,0002,289,664
18Sep 16, 2023 16:45144,87079,597,01752,591,0001,011,0002,289,664
19Sep 16, 2023 16:44145,12479,759,91251,708,0001,988,0002,289,664
20Sep 16, 2023 16:44145,14987,138,24453,705,00002,273,280
21Sep 16, 2023 16:44145,40081,042,84851,806,0001,992,0002,289,664
22Sep 16, 2023 16:44145,48480,766,03952,833,000996,0002,289,664
23Sep 16, 2023 16:45145,52784,929,55651,851,0001,994,0002,289,664
24Sep 16, 2023 16:45145,65775,917,88251,897,0001,996,0002,289,664
25Sep 16, 2023 16:44145,74178,164,47252,926,000998,0002,289,664
26Sep 16, 2023 16:45145,83875,265,61852,961,000999,0002,281,472
27Sep 16, 2023 16:45145,86879,357,57652,972,000999,0002,289,664
28Sep 16, 2023 16:45146,23279,856,87653,105,0001,001,0002,289,664
29Sep 16, 2023 16:45146,25779,289,46852,111,0002,004,0002,289,664
30Sep 16, 2023 16:45146,48175,343,07452,191,0002,007,0002,281,472
31Sep 16, 2023 16:45146,73280,071,04153,286,0001,005,0002,289,664
32Sep 16, 2023 16:45147,09776,869,25053,419,0001,007,0002,289,664
33Sep 16, 2023 16:45147,21678,082,72353,462,0001,008,0002,273,280
34Sep 16, 2023 16:44148,16580,431,99853,825,000996,0002,289,664
35Sep 16, 2023 16:45148,16884,579,79653,826,000996,0002,531,328
36Sep 16, 2023 16:45148,26580,247,29153,861,000997,0002,277,376