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:37Matthew SillsMatthew SillsScore: 109,332Success
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:37108,650102,621,40540,200,60002,277,376
2Jul 27, 2024 17:37108,90071,055,22038,279,0002,014,0002,289,664
3Jul 27, 2024 17:37108,95463,023,59138,298,0002,015,0002,527,232
4Jul 27, 2024 17:37109,20566,958,01838,386,0002,020,0002,289,664
5Jul 27, 2024 17:37109,302110,927,04340,441,71502,273,280
6Jul 27, 2024 17:37109,30862,883,89039,433,0001,011,0002,519,040
7Jul 27, 2024 17:37109,33265,852,61639,442,0001,011,0002,519,040
8Jul 27, 2024 17:37109,41464,241,84838,459,0002,024,0002,289,664
9Jul 27, 2024 17:37109,97369,434,54339,673,0001,017,0002,289,664
10Jul 27, 2024 17:37110,072108,495,92540,726,76102,273,280
11Jul 27, 2024 17:37110,35969,234,30638,842,0001,991,0002,289,664
12Jul 27, 2024 17:37110,36267,030,25739,839,000995,0002,351,104