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 15, 2021 10:53Andrey TsvetkovAndrey TsvetkovError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 15, 2021 10:4900000Error: expected "429496496718 ", got "420906572301 "
2Jul 15, 2021 10:5000000Error: expected "429496444760 ", got "390841786337 "
3Jul 15, 2021 10:5384,89557,721,36930,398,0001,013,0002,334,720
4Jul 15, 2021 10:5385,03255,784,67830,448,0001,014,0002,506,752
5Jul 15, 2021 10:5385,06255,304,69430,458,0001,015,0002,510,848
6Jul 15, 2021 10:5385,08453,663,88529,450,0002,031,0002,498,560
7Jul 15, 2021 10:5385,28151,694,09429,519,0002,035,0002,514,944
8Jul 15, 2021 10:5385,41157,344,33429,564,0002,038,0002,510,848
9Jul 15, 2021 10:5386,08158,048,63129,860,0001,990,0002,502,656
10Jul 15, 2021 10:5386,10855,271,99829,869,0001,991,0002,506,752
11Jul 15, 2021 10:5386,14357,900,26728,885,0002,988,0002,326,528
12Jul 15, 2021 10:5388,82595,923,49032,865,37502,306,048
13Jul 15, 2021 10:5389,05799,913,25232,951,02102,183,168
14Jul 15, 2021 10:5389,41684,103,76633,083,95502,306,048