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 11, 2025 17:59Chandrasekaran AkashChandrasekaran AkashError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 11, 2025 17:5800000Error: expected "429496464265 ", got "429496462965 "stderr
2Apr 11, 2025 17:5969,01952,424,97424,516,0001,021,0002,449,408
3Apr 11, 2025 17:5969,35451,243,54025,661,00002,531,328
4Apr 11, 2025 17:5969,41454,555,39625,683,00002,531,328
5Apr 11, 2025 17:5969,84650,510,95025,843,00002,269,184
6Apr 11, 2025 17:5969,87056,466,34024,858,000994,0002,441,216
7Apr 11, 2025 17:5969,88154,303,85724,862,000994,0002,449,408
8Apr 11, 2025 17:5969,90059,726,64524,869,000994,0002,445,312
9Apr 11, 2025 17:5969,91453,787,27424,874,000994,0002,445,312
10Apr 11, 2025 17:5969,93853,275,27524,882,000995,0002,453,504