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 listApr 9, 2023 21:25Franek KortaFranek KortaError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 9, 2023 21:2400000Error: expected "429496444366 ", got "412316598308 "stderr
2Apr 9, 2023 21:2586,10060,486,27330,862,000995,0002,428,928
3Apr 9, 2023 21:2586,24955,961,43630,915,000997,0002,531,328
4Apr 9, 2023 21:2586,943100,724,99032,169,08702,297,856
5Apr 9, 2023 21:2587,548104,300,44732,392,79402,297,856
6Apr 9, 2023 21:2588,97853,043,48631,925,000997,0002,531,328
7Apr 9, 2023 21:2589,43559,048,49932,089,0001,002,0002,510,848
8Apr 9, 2023 21:2589,64153,970,47132,162,0001,005,0002,527,232
9Apr 9, 2023 21:2589,67355,271,44830,163,0003,016,0002,269,184
10Apr 9, 2023 21:2589,89256,776,79731,245,0002,015,0002,527,232
11Apr 9, 2023 21:2589,986114,272,03133,294,66702,297,856
12Apr 9, 2023 21:2590,32756,871,06632,409,0001,012,0002,531,328
13Apr 9, 2023 21:2591,07363,552,73331,655,0002,042,0002,527,232