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:26Franek 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:2700000Error: expected "429496499300 ", got "429496499061 "stderr
2Aug 30, 2023 21:2668,000104,618,98325,159,95302,301,952
3Aug 30, 2023 21:2668,07885,091,99725,188,88202,207,744
4Aug 30, 2023 21:2768,11895,885,22325,203,53002,301,952
5Aug 30, 2023 21:2768,21787,616,81525,240,42102,301,952
6Aug 30, 2023 21:2668,63290,868,30125,393,65502,179,072
7Aug 30, 2023 21:2768,87385,019,18725,482,96702,183,168