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 listSep 10, 2021 13:53Andrey 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
1Sep 10, 2021 13:5200000Error: expected "429496453221 ", got "395136755579 "stderr
2Sep 10, 2021 13:5385,20353,272,07429,492,0002,033,0002,342,912
3Sep 10, 2021 13:5385,26253,345,69330,530,0001,017,0002,334,720
4Sep 10, 2021 13:5385,26558,422,36429,513,0002,035,0002,424,832
5Sep 10, 2021 13:5385,54656,935,25730,631,0001,021,0002,289,664
6Sep 10, 2021 13:5385,78160,022,63530,716,0001,023,0002,424,832
7Sep 10, 2021 13:5386,10059,448,62131,857,00002,334,720
8Sep 10, 2021 13:5386,18958,975,42528,901,0002,989,0002,334,720
9Sep 10, 2021 13:5386,21964,456,11330,905,000996,0002,334,720
10Sep 10, 2021 13:5386,67860,286,63529,065,0003,006,0002,334,720
11Sep 10, 2021 13:5389,228104,234,67233,014,50202,228,224
12Sep 10, 2021 13:5389,40095,706,25633,078,04102,215,936
13Sep 10, 2021 13:5389,82884,203,30333,236,41602,224,128