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 13:58Andrey TsvetkovAndrey TsvetkovScore: 88,274Success
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 13:5884,63854,346,82029,296,0002,020,0002,510,848
2Jul 14, 2021 13:5885,04957,600,58130,453,0001,015,0002,334,720
3Jul 14, 2021 13:5885,20053,861,42930,508,0001,016,0002,330,624
4Jul 14, 2021 13:5885,20359,832,24329,492,0002,033,0002,506,752
5Jul 14, 2021 13:5885,24152,959,90630,522,0001,017,0002,514,944
6Jul 14, 2021 13:5885,40055,661,82330,579,0001,019,0002,334,720
7Jul 14, 2021 13:5885,78658,059,10029,694,0002,047,0002,334,720
8Jul 14, 2021 13:5886,00358,231,22029,833,0001,988,0002,510,848
9Jul 14, 2021 13:5886,28662,304,30729,931,0001,995,0002,519,040
10Jul 14, 2021 13:5788,274100,080,24332,661,31102,187,264
11Jul 14, 2021 13:5788,31298,040,01832,675,30402,179,072
12Jul 14, 2021 13:5888,44390,598,46032,724,02002,195,456
13Jul 14, 2021 13:5888,452110,307,25432,727,38602,187,264
14Jul 14, 2021 13:5888,46894,017,57832,733,20902,179,072
15Jul 14, 2021 13:5888,74399,597,10132,834,99502,187,264
16Jul 14, 2021 13:5889,128105,283,77732,977,37702,183,168
17Jul 14, 2021 13:5889,245108,245,18833,020,61602,183,168
18Jul 14, 2021 13:5789,296110,471,43833,039,41802,306,048