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 listSep 2, 2023 22:15Franek KortaFranek KortaScore: 63,357Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 2, 2023 22:1563,14348,564,09322,348,0001,015,0002,437,120
2Sep 2, 2023 22:1563,15440,894,17223,367,00002,269,184
3Sep 2, 2023 22:1563,16845,873,46823,372,00002,531,328
4Sep 2, 2023 22:1563,17843,558,10822,360,0001,016,0002,527,232
5Sep 2, 2023 22:1563,17847,914,56822,360,0001,016,0002,531,328
6Sep 2, 2023 22:1563,30048,976,75823,421,00002,445,312
7Sep 2, 2023 22:1563,35741,150,91822,423,0001,019,0002,453,504
8Sep 2, 2023 22:1563,40349,911,12623,459,00002,531,328
9Sep 2, 2023 22:1563,53245,659,47423,507,00002,441,216
10Sep 2, 2023 22:1567,37582,653,90224,928,61302,289,664
11Sep 2, 2023 22:1567,46079,917,67024,960,20902,301,952
12Sep 2, 2023 22:1567,58597,465,73525,006,56502,297,856