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:05Yuriy 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:0400000Error: expected "429496421270 ", got "403726653748 "
2Jul 13, 2021 18:0587,04957,349,15130,195,0002,013,0002,322,432
3Jul 13, 2021 18:0587,43261,532,62629,318,0003,032,0002,506,752
4Jul 13, 2021 18:0587,45156,000,76530,335,0002,022,0002,490,368
5Jul 13, 2021 18:0487,73257,361,88131,447,0001,014,0002,486,272
6Jul 13, 2021 18:0487,80354,235,85031,472,0001,015,0002,490,368
7Jul 13, 2021 18:0487,91456,678,52331,512,0001,016,0002,486,272
8Jul 13, 2021 18:0487,98459,917,00831,537,0001,017,0002,314,240
9Jul 13, 2021 18:0488,16856,488,47531,603,0001,019,0002,486,272
10Jul 13, 2021 18:0588,20857,177,35731,618,0001,019,0002,306,048
11Jul 13, 2021 18:0488,38457,250,11230,659,0002,043,0002,490,368
12Jul 13, 2021 18:0588,59757,233,83830,795,0001,986,0002,314,240
13Jul 13, 2021 18:0488,612108,762,15932,786,60402,285,568
14Jul 13, 2021 18:0588,680100,493,43932,811,68902,289,664
15Jul 13, 2021 18:0588,71458,121,17630,835,0001,989,0002,318,336
16Jul 13, 2021 18:0488,72756,100,24831,835,000994,0002,351,104
17Jul 13, 2021 18:0488,76263,911,08631,847,000995,0002,494,464
18Jul 13, 2021 18:0588,78160,479,98529,863,0002,986,0002,490,368
19Jul 13, 2021 18:0588,79760,108,31829,869,0002,986,0002,318,336
20Jul 13, 2021 18:0488,96795,759,25432,917,68602,285,568
21Jul 13, 2021 20:0088,991100,768,16832,926,50802,289,664
22Jul 13, 2021 18:0489,15958,732,91629,990,0002,999,0002,318,336
23Jul 13, 2021 18:0389,20489,552,26633,005,44602,277,376
24Jul 13, 2021 18:0589,21159,018,22631,008,0002,000,0002,318,336
25Jul 13, 2021 20:0089,243100,832,00233,019,90902,281,472
26Jul 13, 2021 18:0389,316101,652,50533,047,07002,293,760
27Jul 13, 2021 20:0089,33092,085,75033,052,22702,277,376
28Jul 13, 2021 18:0389,65990,977,53933,173,67802,281,472
29Jul 13, 2021 18:0590,06194,753,88333,322,56602,285,568
30Jul 13, 2021 18:0590,10297,726,76633,337,64302,281,472
31Jul 13, 2021 18:0490,55999,238,07933,506,93502,289,664