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 13, 2021 18:56Yuriy LyfenkoYuriy LyfenkoError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 13, 2021 18:5800000Error: expected "429496456176 ", got "429496457382 "stderr
2Jul 13, 2021 18:5761,778545,314,33920,871,0001,987,0002,285,568
3Jul 13, 2021 18:5761,914549,435,58720,916,0001,992,0002,269,184
4Jul 13, 2021 18:5661,932546,740,40121,919,000996,0002,281,472
5Jul 13, 2021 18:5761,935545,935,30320,924,0001,992,0002,281,472
6Jul 13, 2021 18:5761,935544,615,54920,924,0001,992,0002,281,472
7Jul 13, 2021 18:5661,959546,696,93420,932,0001,993,0002,281,472
8Jul 13, 2021 18:5661,965545,025,32820,934,0001,993,0002,285,568
9Jul 13, 2021 18:5762,016546,362,04820,951,0001,995,0002,281,472
10Jul 13, 2021 18:5662,019545,623,13520,952,0001,995,0002,281,472
11Jul 13, 2021 18:5762,019545,705,57520,952,0001,995,0002,281,472
12Jul 13, 2021 18:5662,024549,195,34520,954,0001,995,0002,281,472
13Jul 13, 2021 18:5662,100547,935,84520,979,0001,998,0002,281,472
14Jul 13, 2021 18:5662,178548,018,64021,006,0002,000,0002,281,472
15Jul 13, 2021 18:5762,181544,325,71421,007,0002,000,0002,531,328
16Jul 13, 2021 18:5762,189547,154,91022,010,0001,000,0002,285,568
17Jul 13, 2021 18:5762,224544,696,80821,021,0002,002,0002,277,376
18Jul 13, 2021 18:5662,270545,624,84121,037,0002,003,0002,527,232
19Jul 13, 2021 18:5662,481544,795,64521,108,0002,010,0002,281,472
20Jul 13, 2021 18:5764,563580,163,95623,888,41102,248,704
21Jul 13, 2021 18:5664,578581,003,37723,893,99502,244,608
22Jul 13, 2021 18:5664,615590,640,50323,907,48702,252,800
23Jul 13, 2021 18:5664,643587,932,74023,917,83702,244,608
24Jul 13, 2021 18:5764,701590,105,96723,939,50302,260,992
25Jul 13, 2021 18:5764,744576,656,43023,955,23302,256,896