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:56Franek KortaFranek KortaScore: 61,300Success
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:5660,93249,459,83420,496,0002,049,0002,445,312
2Sep 2, 2023 22:5660,95747,675,45722,554,00002,437,120
3Sep 2, 2023 22:5660,99540,955,95420,517,0002,051,0002,531,328
4Sep 2, 2023 22:5661,06549,174,77820,540,0002,054,0002,441,216
5Sep 2, 2023 22:5661,08942,852,05221,576,0001,027,0002,269,184
6Sep 2, 2023 22:5661,14144,524,84922,622,00002,531,328
7Sep 2, 2023 22:5661,25451,050,33021,634,0001,030,0002,527,232
8Sep 2, 2023 22:5661,30050,627,09722,681,00002,269,184
9Sep 2, 2023 22:5661,91948,806,55221,914,000996,0002,269,184
10Sep 2, 2023 22:4064,94887,358,00824,030,76902,179,072
11Sep 2, 2023 22:4064,96187,812,36524,035,65902,179,072
12Sep 2, 2023 22:5665,01993,246,53724,057,09702,174,976
13Sep 2, 2023 22:4065,08490,331,86224,081,11202,183,168
14Sep 2, 2023 22:5665,13987,017,16424,101,31002,297,856
15Sep 2, 2023 22:5665,97598,811,82924,410,61602,297,856