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 12:09Andrey 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 14, 2021 12:1000000Error: expected "429496472219 ", got "416611585408 "stderr
2Jul 14, 2021 12:1088,24992,553,49632,652,02202,183,168
3Jul 14, 2021 12:0988,45491,985,47632,727,87302,191,360
4Jul 14, 2021 12:1088,716104,752,39732,824,95602,183,168
5Jul 14, 2021 12:0989,187112,864,94932,999,05002,187,264
6Jul 14, 2021 12:0989,314105,006,91633,046,03402,195,456
7Jul 14, 2021 12:1089,32590,746,95833,050,17202,195,456