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 listSep 2, 2023 22:14Franek KortaFranek KortaScore: 63,335Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 2, 2023 22:1462,83045,065,06221,226,0002,021,0002,437,120
2Sep 2, 2023 22:1463,07848,099,84022,325,0001,014,0002,445,312
3Sep 2, 2023 22:1463,19244,796,74923,381,00002,441,216
4Sep 2, 2023 22:1463,22244,309,99322,375,0001,017,0002,449,408
5Sep 2, 2023 22:1463,22749,412,28121,360,0002,034,0002,437,120
6Sep 2, 2023 22:1463,29748,877,60023,420,00002,265,088
7Sep 2, 2023 22:1463,33553,658,93922,416,0001,018,0002,527,232
8Sep 2, 2023 22:1463,41943,540,95523,465,00002,531,328
9Sep 2, 2023 22:1463,43843,687,81623,472,00002,265,088
10Sep 2, 2023 22:1467,50398,198,97424,975,93002,285,568
11Sep 2, 2023 22:1467,61283,167,73925,016,29402,297,856
12Sep 2, 2023 22:1467,75192,551,40725,067,74802,297,856