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 14, 2021 14:55Yuriy 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 14, 2021 14:5600000Error: expected "429496430170 ", got "429496432473 "stderr
2Jul 14, 2021 14:5400000Error: expected "429496398928 ", got "429496403068 "stderr
3Jul 13, 2021 19:0161,541550,438,64021,780,000990,0002,285,568
4Jul 13, 2021 18:5961,746545,931,55120,860,0001,986,0002,285,568
5Jul 13, 2021 18:5961,754545,655,27220,863,0001,986,0002,527,232
6Jul 13, 2021 18:5961,838545,230,98420,891,0001,989,0002,281,472
7Jul 13, 2021 19:0161,865545,800,90620,900,0001,990,0002,285,568
8Jul 13, 2021 18:5961,873549,759,44421,898,000995,0002,285,568
9Jul 13, 2021 19:0161,876545,877,36920,904,0001,990,0002,281,472
10Jul 13, 2021 19:0161,997553,123,57420,945,0001,994,0002,281,472
11Jul 13, 2021 18:5962,008544,266,46021,946,000997,0002,285,568
12Jul 13, 2021 19:0162,111545,988,83820,983,0001,998,0002,285,568
13Jul 13, 2021 18:5962,211551,861,68921,017,0002,001,0002,281,472
14Jul 13, 2021 19:0162,243550,288,79522,029,0001,001,0002,281,472
15Jul 13, 2021 19:0162,273544,169,90521,038,0002,003,0002,281,472
16Jul 13, 2021 18:5962,378544,794,63621,073,0002,007,0002,285,568
17Jul 13, 2021 19:0162,386546,555,87921,076,0002,007,0002,535,424
18Jul 13, 2021 18:5962,405545,452,90221,083,0002,007,0002,285,568
19Jul 13, 2021 19:0162,414546,702,65322,089,0001,004,0002,281,472
20Jul 13, 2021 18:5962,422546,205,65421,088,0002,008,0002,285,568
21Jul 13, 2021 18:5964,213591,483,36823,758,67002,248,704
22Jul 13, 2021 19:0164,264584,274,28123,777,57602,244,608
23Jul 14, 2021 14:5564,286550,093,06823,786,00002,281,472
24Jul 13, 2021 18:5964,411588,754,81923,832,17602,248,704
25Jul 14, 2021 14:5564,589550,547,61521,907,0001,991,0002,277,376
26Jul 13, 2021 18:5964,617582,927,12623,908,41102,252,800
27Jul 13, 2021 19:0164,637585,367,57823,915,84902,244,608
28Jul 13, 2021 19:0164,642591,747,33323,917,43602,273,280
29Jul 14, 2021 14:5564,719545,856,35921,951,0001,995,0002,281,472
30Jul 14, 2021 14:5564,730547,045,40021,955,0001,995,0002,281,472
31Jul 14, 2021 14:5564,908549,275,26522,015,0002,001,0002,531,328
32Jul 14, 2021 14:5565,016544,445,28322,052,0002,004,0002,281,472
33Jul 14, 2021 14:5565,062558,036,42923,070,0001,003,0002,281,472
34Jul 14, 2021 14:5565,127548,052,81422,089,0002,008,0002,281,472
35Jul 14, 2021 14:5565,168548,302,78622,103,0002,009,0002,285,568
36Jul 14, 2021 14:5567,024592,203,67224,798,87402,240,512
37Jul 14, 2021 14:5567,136582,186,48424,840,41202,260,992
38Jul 14, 2021 14:5567,253578,553,30924,883,63602,248,704