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 7, 2021 22:26Yuriy LyfenkoYuriy LyfenkoError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 7, 2021 22:2500000Error: expected "429496494720 ", got "425201532460 "stderr
2Jul 7, 2021 22:26204,2261,037,125,93775,563,475060,764,160
3Jul 7, 2021 22:36206,5551,047,786,09776,425,195060,583,936
4Jul 7, 2021 22:26208,1201,111,978,19577,004,252059,150,336
5Jul 7, 2021 22:36217,9101,038,878,04980,626,876063,344,640
6Jul 7, 2021 22:36224,7531,056,480,64883,158,768065,441,792
7Jul 7, 2021 22:26227,2401,122,054,61084,078,920065,531,904
8Jul 7, 2021 22:365,286,6772,511,668,6071,956,070,32502,232,320
9Jul 7, 2021 22:2614,552,1545,942,183,7595,384,296,98402,322,432
10Jul 7, 2021 22:3616,302,4726,647,034,4246,031,914,59502,207,744
11Jul 7, 2021 22:3620,974,5158,441,564,4927,760,570,64102,228,224
12Jul 7, 2021 22:2621,466,1678,515,525,8857,942,481,66102,269,184
13Jul 7, 2021 22:2622,639,1528,996,680,8538,376,486,06302,306,048