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 2, 2022 17:41Franek 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 2, 2022 17:3900000Error: expected "429496525782 ", got "425201578947 "stderr
2Aug 2, 2022 17:51135,910120,641,33850,286,82602,224,128
3Aug 2, 2022 17:51136,791125,134,84050,612,49902,265,088
4Aug 2, 2022 17:51137,050123,659,07050,708,60702,228,224
5Aug 2, 2022 17:41147,855139,443,61754,706,26902,215,936
6Aug 2, 2022 17:41148,058142,197,57754,781,43702,203,648
7Aug 2, 2022 17:41148,814131,010,22455,061,16502,195,456