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 16, 2023 11:37mmalczakmmalczakScore: 99,019Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 16, 2023 11:3797,62261,274,57734,114,0002,006,0002,531,328
2Sep 16, 2023 11:3797,88461,497,36935,211,0001,006,0002,289,664
3Sep 16, 2023 11:3797,94959,393,03334,228,0002,013,0002,519,040
4Sep 16, 2023 11:3798,13857,721,34734,294,0002,017,0002,289,664
5Sep 16, 2023 11:3798,84661,614,73936,573,00002,289,664
6Sep 16, 2023 11:3799,00364,962,44236,631,00002,277,376
7Sep 16, 2023 11:3799,01963,732,52835,620,0001,017,0002,269,184
8Sep 16, 2023 11:3799,18967,370,67635,681,0001,019,0002,289,664
9Sep 16, 2023 11:3799,242113,806,14736,719,65102,273,280
10Sep 16, 2023 11:3799,55966,488,75035,842,000995,0002,273,280
11Sep 16, 2023 11:3799,889114,030,16636,958,75102,265,088
12Sep 16, 2023 11:37100,608109,352,28537,224,83502,260,992