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 listMay 7, 2024 19:12Joad NacerJoad NacerScore: 65,454Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 7, 2024 19:1265,12447,480,52423,092,0001,004,0002,355,200
2May 7, 2024 19:1265,18954,193,08323,115,0001,005,0002,289,664
3May 7, 2024 19:1265,19250,144,03222,111,0002,010,0002,289,664
4May 7, 2024 19:1265,23851,659,36523,133,0001,005,0002,527,232
5May 7, 2024 19:1265,32450,728,45023,163,0001,007,0002,273,280
6May 7, 2024 19:1265,44143,660,03922,196,0002,017,0002,289,664
7May 7, 2024 19:1265,45448,040,55122,200,0002,018,0002,289,664
8May 7, 2024 19:1265,52445,046,11122,224,0002,020,0002,523,136
9May 7, 2024 19:1265,87644,059,27522,343,0002,031,0002,289,664
10May 7, 2024 19:1269,21384,335,28825,608,75502,265,088
11May 7, 2024 19:1269,42590,554,14925,687,06902,277,376
12May 7, 2024 19:1269,62292,592,81825,760,04602,277,376