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 16:59Franek KortaFranek KortaScore: 75,341Success
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 16:5973,54354,471,21425,196,0002,015,0002,437,120
2Apr 9, 2023 16:5974,14650,085,78427,434,00002,449,408
3Apr 9, 2023 16:5974,42249,431,45726,517,0001,019,0002,531,328
4Apr 9, 2023 16:5974,43251,166,81226,520,0001,020,0002,531,328
5Apr 9, 2023 16:5974,80357,588,14527,677,00002,527,232
6Apr 9, 2023 16:5974,86253,200,15326,674,0001,025,0002,269,184
7Apr 9, 2023 16:5975,34146,018,87626,881,000995,0002,531,328
8Apr 9, 2023 16:5976,69255,448,48326,350,0002,026,0002,441,216
9Apr 9, 2023 16:5977,38154,322,83028,631,00002,437,120
10Apr 9, 2023 16:5979,86890,459,33729,551,17202,293,760
11Apr 9, 2023 16:5980,47282,435,54529,774,70102,293,760
12Apr 9, 2023 16:5980,74191,159,27129,874,26502,170,880