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 listSep 10, 2021 13:56Andrey 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
1Sep 10, 2021 13:5600000Error: expected "429496467604 ", got "399431733579 "stderr
2Sep 10, 2021 13:5700000Error: expected "429496465520 ", got "399431730740 "stderr
3Sep 10, 2021 13:5790,59692,154,93933,520,36602,232,320
4Sep 10, 2021 13:5790,642103,142,75533,537,46102,228,224
5Sep 10, 2021 13:5791,37599,885,75633,808,87902,236,416