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 28, 2023 16:34mmalczakmmalczakScore: 69,881Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 28, 2023 16:3469,13046,208,35125,578,00002,519,040
2Sep 28, 2023 16:3569,15151,694,52724,563,0001,023,0002,428,928
3Sep 28, 2023 16:3569,23251,362,76525,616,00002,535,424
4Sep 28, 2023 16:3469,27653,083,05925,632,00002,535,424
5Sep 28, 2023 16:3569,27653,878,47425,632,00002,273,280
6Sep 28, 2023 16:3569,36558,901,62325,665,00002,273,280
7Sep 28, 2023 16:3469,43555,422,96325,691,00002,273,280
8Sep 28, 2023 16:3569,44649,776,08425,695,00002,514,944
9Sep 28, 2023 16:3469,48651,953,08524,682,0001,028,0002,437,120
10Sep 28, 2023 16:3469,49551,303,55125,713,00002,437,120
11Sep 28, 2023 16:3469,50553,692,75025,717,00002,428,928
12Sep 28, 2023 16:3569,83052,718,35824,844,000993,0002,535,424
13Sep 28, 2023 16:3469,88148,737,27825,856,00002,535,424
14Sep 28, 2023 16:3569,90051,778,08224,869,000994,0002,514,944
15Sep 28, 2023 16:3569,90352,307,44924,870,000994,0002,535,424
16Sep 28, 2023 16:3569,90851,993,74524,872,000994,0002,514,944
17Sep 28, 2023 16:3469,92251,407,44123,881,0001,990,0002,273,280
18Sep 28, 2023 16:3469,98154,186,29024,898,000995,0002,535,424
19Sep 28, 2023 16:3472,29489,678,52026,748,72402,285,568
20Sep 28, 2023 16:3472,516104,342,61026,830,73902,277,376
21Sep 28, 2023 16:3572,63994,545,10626,876,45102,285,568
22Sep 28, 2023 16:3472,69895,257,86626,898,27302,277,376
23Sep 28, 2023 16:3572,74888,996,96126,916,69502,281,472
24Sep 28, 2023 16:3574,34194,648,30327,506,22902,281,472