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 3, 2026 17:43Aleksei ShahoikaAleksei ShahoikaError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 3, 2026 17:46045,880,21725,067,0001,275,0002,506,752expected "429496498030 ", got "429496498006"
2May 3, 2026 17:4670,90046,012,62224,956,0001,277,0002,514,944
3May 3, 2026 17:4670,98642,013,90125,026,0001,239,0002,527,232
4May 3, 2026 17:4671,20244,177,66125,039,0001,306,0002,527,232
5May 3, 2026 17:4671,28942,628,68325,146,0001,231,0002,519,040
6May 3, 2026 17:4671,43242,093,92525,261,0001,169,0002,523,136
7May 3, 2026 17:4671,61845,003,19125,243,0001,256,0002,519,040
8May 3, 2026 17:4671,84544,300,31125,289,0001,294,0002,523,136
9May 3, 2026 17:4672,09742,189,84025,371,0001,305,0002,519,040