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 listAug 30, 2023 21:46Franek KortaFranek KortaError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Aug 30, 2023 21:4600000Error: expected "429496516552 ", got "429496512370 "
2Aug 30, 2023 21:4665,376106,233,34724,189,12302,256,896
3Aug 30, 2023 21:4765,62090,760,99224,279,58402,256,896
4Aug 30, 2023 21:4765,659117,264,05524,293,71202,252,800
5Aug 30, 2023 21:4665,75586,674,81224,329,16802,240,512
6Aug 30, 2023 21:4766,01694,472,53224,426,05802,248,704
7Aug 30, 2023 21:4666,16882,880,81024,482,14602,256,896