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 listJul 27, 2024 11:06Joad NacerJoad NacerError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 27, 2024 11:0700000Error: expected "429496474745 ", got "390841814720 "stderr
2Sep 2, 2024 23:1000000Error: expected "429496476724 ", got "425201514375 "stderr
3Sep 2, 2024 23:1200000Error: expected "429496466315 ", got "425201503958 "stderr
4Sep 2, 2024 23:1400000Error: expected "429496462163 ", got "412316613187 "stderr
5Sep 2, 2024 23:1400000Error: expected "429496473104 ", got "420906548518 "stderr
6Jul 27, 2024 11:0666,37181,386,30024,557,39502,277,376
7Jul 27, 2024 11:0666,63294,775,90524,653,93302,289,664
8Jul 27, 2024 11:0766,75394,388,72224,698,44102,285,568
9Jul 27, 2024 11:0766,87188,119,95924,742,17402,289,664
10Jul 27, 2024 11:0666,98294,001,72424,783,16602,289,664
11Jul 27, 2024 11:0966,997108,705,13524,788,74102,293,760
12Jul 27, 2024 11:0967,10681,388,48324,829,35702,252,800
13Jul 27, 2024 11:0767,10989,984,75524,830,28502,281,472
14Jul 27, 2024 11:0967,169100,279,66724,852,70202,277,376