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 22, 2023 17:31mmalczakmmalczakScore: 72,946Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 22, 2023 17:3172,52756,681,92725,842,000993,0002,289,664
2Sep 22, 2023 21:4172,53052,594,36124,849,0001,987,0002,289,664
3Sep 22, 2023 17:3172,58953,440,39925,864,000994,0002,289,664
4Sep 22, 2023 21:4172,72449,854,64525,912,000996,0002,289,664
5Sep 22, 2023 21:4172,72456,140,44925,912,000996,0002,289,664
6Sep 22, 2023 21:4172,73853,844,70224,920,0001,993,0002,289,664
7Sep 22, 2023 21:4172,77351,324,78424,932,0001,994,0002,289,664
8Sep 22, 2023 17:3172,81452,562,37524,946,0001,995,0002,289,664
9Sep 22, 2023 17:3172,82749,344,73024,950,0001,996,0002,281,472
10Sep 22, 2023 17:3172,82750,993,36024,950,0001,996,0002,273,280
11Sep 22, 2023 17:3172,83251,310,82124,952,0001,996,0002,289,664
12Sep 22, 2023 17:3172,83853,086,06024,954,0001,996,0002,277,376
13Sep 22, 2023 21:4172,87050,419,27024,965,0001,997,0002,277,376
14Sep 22, 2023 17:3172,94652,993,89324,991,0001,999,0002,289,664
15Sep 22, 2023 21:4172,99255,189,99425,007,0002,000,0002,273,280
16Sep 22, 2023 21:4172,99754,768,03225,009,0002,000,0002,289,664
17Sep 22, 2023 17:3173,07652,134,91725,036,0002,002,0002,277,376
18Sep 22, 2023 21:4173,44349,534,10525,162,0002,012,0002,289,664
19Sep 22, 2023 21:4175,34998,478,12827,879,06702,273,280
20Sep 22, 2023 17:3175,69265,759,36928,006,07302,260,992
21Sep 22, 2023 21:4175,76181,005,13528,031,72602,269,184
22Sep 22, 2023 17:3175,930102,310,71528,094,26802,260,992
23Sep 22, 2023 21:2575,93997,668,83228,097,50702,273,280
24Sep 22, 2023 21:2575,95180,938,65428,101,86802,269,184
25Sep 22, 2023 21:2576,06299,080,98428,143,02302,260,992
26Sep 22, 2023 21:4176,085105,522,20228,151,44802,269,184
27Sep 22, 2023 17:3176,40199,026,37128,268,50402,269,184