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 12, 2021 22:03piculpiculScore: 122,392Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 12, 2021 22:03119,772104,500,89944,315,56702,260,992
2Sep 12, 2021 22:03120,58670,309,68343,603,0001,014,0002,527,232
3Sep 12, 2021 22:03121,19770,365,08042,850,0001,993,0002,281,472
4Sep 12, 2021 22:03121,22466,050,47744,853,00002,281,472
5Sep 12, 2021 22:03121,72272,909,47043,036,0002,001,0002,523,136
6Sep 12, 2021 22:03121,77667,904,25543,055,0002,002,0002,523,136
7Sep 12, 2021 22:03122,392105,096,10345,285,19302,256,896
8Sep 12, 2021 22:03123,20376,422,65645,585,00002,281,472
9Sep 12, 2021 22:03123,24382,549,02144,587,0001,013,0002,523,136
10Sep 12, 2021 22:03123,40872,423,42344,647,0001,014,0002,523,136
11Sep 12, 2021 22:03124,07499,982,77945,907,21202,248,704
12Sep 12, 2021 22:03124,45170,693,45844,045,0002,002,0002,281,472