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 17:18Matthew SillsMatthew SillsScore: 109,541Success
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 17:18108,56862,750,15739,166,0001,004,0002,519,040
2Jul 27, 2024 17:18108,83268,842,82038,255,0002,013,0002,289,664
3Jul 27, 2024 17:18108,94166,034,77038,293,0002,015,0002,269,184
4Jul 27, 2024 17:18109,22463,696,17739,403,0001,010,0002,375,680
5Jul 27, 2024 17:18109,231120,076,02340,415,37502,269,184
6Jul 27, 2024 17:18109,24663,580,20939,411,0001,010,0002,289,664
7Jul 27, 2024 17:18109,54162,970,31740,530,00002,379,776
8Jul 27, 2024 17:18109,85972,096,38639,632,0001,016,0002,289,664
9Jul 27, 2024 17:18109,90367,837,16839,648,0001,016,0002,523,136
10Jul 27, 2024 17:18110,72267,852,39438,969,0001,998,0002,289,664
11Jul 27, 2024 17:18111,683108,793,93041,322,68502,260,992
12Jul 27, 2024 17:18112,262123,480,71341,536,76502,273,280