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 14, 2021 14:20Yuriy 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 14, 2021 14:1800000Error: expected "429496440273 ", got "429496440377 "
2Jul 14, 2021 14:1900000Error: expected "429496441902 ", got "429496442076 "
3Jul 14, 2021 14:2084,773553,343,82330,355,0001,011,0002,502,656
4Jul 14, 2021 14:2084,849554,817,29129,369,0002,025,0002,326,528
5Jul 14, 2021 14:2085,919562,699,51528,810,0002,980,0002,326,528
6Jul 14, 2021 14:2085,954558,406,82428,822,0002,981,0002,330,624
7Jul 14, 2021 14:2086,092560,395,04529,864,0001,990,0002,510,848
8Jul 14, 2021 14:2086,295565,393,36228,936,0002,993,0002,326,528
9Jul 14, 2021 14:2086,403556,411,65229,971,0001,998,0002,326,528
10Jul 14, 2021 14:2086,470561,140,00728,995,0002,999,0002,379,776
11Jul 14, 2021 14:2086,643555,471,01330,055,0002,003,0002,510,848
12Jul 14, 2021 14:2086,857591,038,89632,137,19302,248,704
13Jul 14, 2021 14:2087,387592,403,85032,333,07402,248,704
14Jul 14, 2021 14:2087,893591,775,69032,520,55502,248,704