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 15, 2021 10:43Andrey TsvetkovAndrey TsvetkovError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 15, 2021 10:4300000Error: expected "429496466272 ", got "377956921107 "
2Jul 15, 2021 10:4600000Error: expected "429496438506 ", got "347892163442 "
3Jul 15, 2021 10:4600000Error: expected "429496484227 ", got "416611597463 "
4Jul 15, 2021 10:4788,79090,102,67932,852,38002,179,072
5Jul 15, 2021 10:4688,838101,944,22132,869,95702,306,048
6Jul 15, 2021 10:4788,846103,450,38932,873,07302,179,072
7Jul 15, 2021 10:4688,85790,696,71332,877,12202,174,976
8Jul 15, 2021 10:4689,525103,945,13333,124,16202,187,264
9Jul 15, 2021 10:4789,84191,254,72133,241,25502,179,072