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 listJun 8, 2024 13:48Joad NacerJoad NacerError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 8, 2024 13:4800000Error: expected "429496459723 ", got "360777067972 "
2Jun 8, 2024 13:4864,88947,063,72022,009,0002,000,0002,531,328
3Jun 8, 2024 13:4864,94950,844,92922,029,0002,002,0002,289,664
4Jun 8, 2024 13:4865,09246,793,16922,077,0002,007,0002,371,584
5Jun 8, 2024 13:4865,19748,145,97322,113,0002,010,0002,273,280
6Jun 8, 2024 13:4865,32249,653,50323,162,0001,007,0002,269,184
7Jun 8, 2024 13:4865,35449,858,55423,174,0001,007,0002,289,664
8Jun 8, 2024 13:4865,43245,852,88323,202,0001,008,0002,289,664
9Jun 8, 2024 13:4865,51447,857,75723,230,0001,010,0002,531,328
10Jun 8, 2024 13:4865,53848,272,96122,229,0002,020,0002,289,664
11Jun 8, 2024 13:4869,54994,309,77725,733,12902,269,184
12Jun 8, 2024 13:4869,75896,655,62725,810,46302,281,472
13Jun 8, 2024 13:4870,02892,445,59625,910,42102,269,184