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:07Joad NacerJoad NacerScore: 75,308Success
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:0774,60853,811,62526,583,0001,022,0002,289,664
2May 7, 2024 00:0774,72752,299,10426,625,0001,024,0002,289,664
3May 7, 2024 00:0775,18656,499,02626,826,000993,0002,289,664
4May 7, 2024 00:0775,26554,492,93526,854,000994,0002,289,664
5May 7, 2024 00:0775,27349,255,78625,862,0001,989,0002,379,776
6May 7, 2024 00:0775,27657,071,69125,863,0001,989,0002,289,664
7May 7, 2024 00:0775,30855,884,17526,869,000995,0002,273,280
8May 7, 2024 00:0775,32454,392,21825,880,0001,990,0002,289,664
9May 7, 2024 00:0775,33256,068,42526,878,000995,0002,289,664
10May 7, 2024 00:0775,86695,275,52128,070,29502,269,184
11May 7, 2024 00:0776,230102,318,88628,205,01802,273,280
12May 7, 2024 00:0776,31993,213,70728,238,14302,277,376