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 listJul 15, 2021 10: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
1Jul 15, 2021 10:5500000Error: expected "429496460509 ", got "390841801127 "
2Jul 15, 2021 10:5684,85451,384,01129,371,0002,025,0002,502,656
3Jul 15, 2021 10:5684,94162,771,20930,415,0001,013,0002,326,528
4Jul 15, 2021 10:5685,06557,141,08130,459,0001,015,0002,371,584
5Jul 15, 2021 10:5685,20852,497,57631,527,00002,334,720
6Jul 15, 2021 10:5685,36865,501,84729,549,0002,037,0002,502,656
7Jul 15, 2021 10:5685,38961,321,19729,556,0002,038,0002,506,752
8Jul 15, 2021 10:5686,07856,889,67530,854,000995,0002,334,720
9Jul 15, 2021 10:5686,07860,227,27030,854,000995,0002,334,720
10Jul 15, 2021 10:5686,13059,744,75330,873,000995,0002,334,720
11Jul 15, 2021 10:5688,917110,349,07432,899,18902,183,168
12Jul 15, 2021 10:5689,14995,763,72832,985,11002,306,048
13Jul 15, 2021 10:5689,409105,105,66833,081,40102,183,168