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 11:02Andrey TsvetkovAndrey TsvetkovScore: 96,376Success
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 11:0295,71963,086,13832,381,0003,035,0002,334,720
2Jul 13, 2021 11:0295,76262,359,60832,395,0003,037,0002,527,232
3Jul 13, 2021 11:0295,77064,255,88933,411,0002,024,0002,527,232
4Jul 13, 2021 11:0295,93062,351,73434,480,0001,014,0002,531,328
5Jul 13, 2021 11:0296,00857,397,09833,494,0002,029,0002,527,232
6Jul 13, 2021 11:0296,04356,918,86734,521,0001,015,0002,334,720
7Jul 13, 2021 11:0296,37663,650,52734,641,0001,018,0002,523,136
8Jul 13, 2021 11:0296,39762,098,99133,629,0002,038,0002,334,720
9Jul 13, 2021 11:0296,89762,363,56333,861,0001,991,0002,334,720
10Jul 13, 2021 11:0299,074101,878,23036,657,49102,199,552
11Jul 13, 2021 11:0299,624102,689,23936,860,77002,203,648
12Jul 13, 2021 11:02100,335107,816,86037,124,02102,203,648