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 26, 2024 23:54Joad NacerJoad NacerError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 26, 2024 23:5400000Error: expected "429496433833 ", got "410169127261 "
2May 26, 2024 23:5500000Error: expected "429496453486 ", got "392989322807 "
3May 26, 2024 23:5668,61688,096,59825,387,79802,273,280
4May 26, 2024 23:5668,62393,809,47025,390,40502,260,992
5May 26, 2024 23:5669,48094,386,53025,707,50802,269,184