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 23, 2024 07:26Maxim ElchuginMaxim ElchuginScore: 118,732Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 23, 2024 07:26114,85465,498,26440,473,0002,023,0002,281,472
2May 23, 2024 07:26117,61665,189,50142,506,0001,012,0002,281,472
3May 23, 2024 07:26118,34170,454,51543,786,00002,506,752
4May 23, 2024 07:26118,51670,401,83341,858,0001,993,0002,330,624
5May 23, 2024 07:26118,53873,970,43643,859,00002,281,472
6May 23, 2024 07:26118,56571,984,67640,878,0002,991,0002,281,472
7May 23, 2024 07:26118,73269,416,84040,936,0002,995,0002,281,472
8May 23, 2024 07:26118,75969,328,05941,944,0001,997,0002,281,472
9May 23, 2024 07:26119,18469,267,77742,094,0002,004,0002,281,472
10May 23, 2024 07:26120,793116,872,40544,693,22902,265,088
11May 23, 2024 07:26121,189111,057,70744,839,85002,252,800
12May 23, 2024 07:26123,146105,341,62045,563,96102,260,992