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 listMay 7, 2024 00:33Joad NacerJoad NacerScore: 65,370Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 7, 2024 00:3364,70548,021,90521,946,0001,995,0002,289,664
2May 7, 2024 00:3365,00847,206,58822,049,0002,004,0002,523,136
3May 7, 2024 00:3365,05452,262,22022,065,0002,005,0002,289,664
4May 7, 2024 00:3365,07347,908,53922,071,0002,006,0002,289,664
5May 7, 2024 00:3365,24346,374,18722,129,0002,011,0002,281,472
6May 7, 2024 00:3365,28947,536,94322,144,0002,013,0002,265,088
7May 7, 2024 00:3365,37047,212,72222,172,0002,015,0002,289,664
8May 7, 2024 00:3365,45455,492,57523,209,0001,009,0002,289,664
9May 7, 2024 00:3365,48947,413,57322,212,0002,019,0002,289,664
10May 7, 2024 00:3368,798101,610,97425,455,21802,273,280
11May 7, 2024 00:3368,91790,612,77325,499,45702,273,280
12May 7, 2024 00:3369,349112,573,27625,659,19102,269,184