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 19:50Franek KortaFranek KortaScore: 100,781Success
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 19:5081,68688,998,53730,223,78802,293,760
2Apr 9, 2023 19:5083,47492,459,38730,885,34702,174,976
3Apr 9, 2023 19:5085,527102,135,83731,645,13502,285,568
4Apr 9, 2023 19:5099,01661,313,15634,601,0002,035,0002,269,184
5Apr 9, 2023 19:50100,43260,022,70536,156,0001,004,0002,437,120
6Apr 9, 2023 19:50100,60362,901,66234,205,0003,018,0002,437,120
7Apr 9, 2023 19:50100,78161,258,86437,289,00002,433,024
8Apr 9, 2023 19:50102,30863,587,68836,858,000996,0002,527,232
9Apr 9, 2023 19:50102,81963,451,07937,042,0001,001,0002,527,232
10Apr 9, 2023 19:50103,05165,085,40937,126,0001,003,0002,523,136
11Apr 9, 2023 19:50103,44360,550,46936,260,0002,014,0002,441,216
12Apr 9, 2023 19:50105,00363,955,51836,859,0001,992,0002,527,232