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 listJul 16, 2023 16:17Paul MasurelPaul MasurelScore: 72,495Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 16, 2023 16:1371,49254,747,54125,435,0001,017,0002,285,568
2Jul 16, 2023 16:1371,54952,558,44226,473,00002,355,200
3Jul 16, 2023 16:1771,60053,082,57125,474,0001,018,0002,285,568
4Jul 16, 2023 16:1771,67648,525,58625,500,0001,020,0002,363,392
5Jul 16, 2023 16:1371,80054,548,76625,545,0001,021,0002,281,472
6Jul 16, 2023 16:1371,88654,516,50525,575,0001,023,0002,285,568
7Jul 16, 2023 16:1371,93854,633,56226,617,00002,285,568
8Jul 16, 2023 16:1771,96256,072,30325,602,0001,024,0002,355,200
9Jul 16, 2023 16:1771,98452,006,61325,610,0001,024,0002,281,472
10Jul 16, 2023 16:1372,04356,625,04725,631,0001,025,0002,281,472
11Jul 16, 2023 16:1772,06556,977,02025,639,0001,025,0002,359,296
12Jul 16, 2023 16:1372,16556,744,77126,701,00002,355,200
13Jul 16, 2023 16:1372,49553,199,66325,830,000993,0002,285,568
14Jul 16, 2023 16:1772,53053,031,58525,843,000993,0002,281,472
15Jul 16, 2023 16:1772,54359,084,47325,847,000994,0002,281,472
16Jul 16, 2023 16:1372,54949,338,49724,855,0001,988,0002,281,472
17Jul 16, 2023 16:1772,55754,244,48626,846,00002,465,792
18Jul 16, 2023 16:1772,58453,286,03624,867,0001,989,0002,285,568
19Jul 16, 2023 16:1773,66293,656,06127,254,97002,256,896
20Jul 16, 2023 16:1373,85797,001,98427,327,09702,199,552
21Jul 16, 2023 16:1374,19296,589,49927,450,99802,318,336
22Jul 16, 2023 16:1774,20298,964,51427,454,82802,260,992
23Jul 16, 2023 16:1374,23372,221,55227,466,25602,256,896
24Jul 16, 2023 16:1778,475113,292,90129,035,70102,277,376