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 listOct 3, 2023 11:21apuxbtapuxbtError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 3, 2023 11:2000000Error: expected "429496469540 ", got "399431961538 "stderr
2Oct 3, 2023 11:2175,43849,831,67226,916,000996,0002,285,568
3Oct 3, 2023 11:2175,50550,219,21025,942,0001,995,0002,285,568
4Oct 3, 2023 11:2175,65751,046,41726,994,000999,0002,285,568
5Oct 3, 2023 11:2175,76251,987,27926,030,0002,002,0002,523,136
6Oct 3, 2023 11:2175,76852,646,19827,033,0001,001,0002,285,568
7Oct 3, 2023 11:2176,07055,024,12227,141,0001,005,0002,285,568
8Oct 3, 2023 11:2176,31149,378,68226,219,0002,016,0002,285,568
9Oct 3, 2023 11:2176,39553,055,06426,247,0002,019,0002,383,872
10Oct 3, 2023 11:2176,50850,972,25026,286,0002,022,0002,269,184
11Oct 3, 2023 11:2179,10982,880,59129,270,27902,260,992
12Oct 3, 2023 11:2179,18986,201,37529,299,95802,273,280
13Oct 3, 2023 11:2179,71899,089,82629,495,76702,256,896