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 2, 2023 22:32Franek KortaFranek KortaError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 2, 2023 22:3200000Error: expected "429496513555 ", got "429496510348"stderr
2Sep 2, 2023 22:3263,11146,775,99421,321,0002,030,0002,531,328
3Sep 2, 2023 22:3263,23848,669,02323,398,00002,531,328
4Sep 2, 2023 22:3263,26244,422,09423,407,00002,256,896
5Sep 2, 2023 22:3263,29245,538,98421,382,0002,036,0002,437,120
6Sep 2, 2023 22:3263,30050,096,14420,366,0003,055,0002,527,232
7Sep 2, 2023 22:3263,34145,962,76623,436,00002,531,328
8Sep 2, 2023 22:3263,40044,270,06323,458,00002,531,328
9Sep 2, 2023 22:3263,70048,906,53622,545,0001,024,0002,527,232
10Sep 2, 2023 22:3263,75749,772,23722,608,000982,0002,445,312
11Sep 2, 2023 22:3267,36597,896,94124,924,89402,301,952
12Sep 2, 2023 22:2867,45390,763,53524,957,78702,293,760
13Sep 2, 2023 22:3267,47193,586,11824,964,19402,297,856
14Sep 2, 2023 22:2867,48292,659,83024,968,16302,174,976
15Sep 2, 2023 22:2867,74999,554,44525,066,97702,297,856
16Sep 2, 2023 22:3267,83875,950,90125,099,93702,301,952