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:52Franek KortaFranek KortaScore: 102,508Success
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:5284,521102,273,68531,272,94802,297,856
2Apr 9, 2023 19:5285,37388,997,08231,587,92802,297,856
3Apr 9, 2023 19:5286,33091,549,06231,942,08402,293,760
4Apr 9, 2023 19:52101,21155,465,19535,424,0002,024,0002,531,328
5Apr 9, 2023 19:52101,40062,397,72637,518,00002,441,216
6Apr 9, 2023 19:52101,67366,296,62336,603,0001,016,0002,523,136
7Apr 9, 2023 19:52102,50862,314,62236,930,000998,0002,445,312
8Apr 9, 2023 19:52102,57661,472,61434,957,0002,996,0002,437,120
9Apr 9, 2023 19:52102,68961,969,52436,969,0001,026,0002,531,328
10Apr 9, 2023 19:52102,89257,580,84837,069,0001,001,0002,441,216
11Apr 9, 2023 19:52104,45461,839,81838,648,00002,441,216
12Apr 9, 2023 19:52105,00066,757,33338,850,00002,523,136