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 listApr 9, 2023 20:18Franek KortaFranek KortaScore: 108,595Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 9, 2023 20:1989,84658,171,46932,236,0001,007,0002,433,024
2Apr 9, 2023 20:1991,65454,753,56930,920,0002,992,0002,514,944
3Apr 9, 2023 20:1991,79260,812,28230,967,0002,996,0002,527,232
4Apr 9, 2023 20:1991,95761,905,08431,022,0003,002,0002,523,136
5Apr 9, 2023 20:1992,33857,245,38033,161,0001,004,0002,428,928
6Apr 9, 2023 20:1994,17864,625,66034,846,00002,437,120
7Apr 9, 2023 20:1994,99256,535,82734,143,0001,004,0002,269,184
8Apr 9, 2023 20:1995,10362,234,35633,178,0002,010,0002,269,184
9Apr 9, 2023 20:1995,94358,932,73835,499,00002,531,328
10Apr 9, 2023 20:19100,387102,377,38937,143,12402,297,856
11Apr 9, 2023 20:19103,10496,233,32638,148,40002,289,664
12Apr 9, 2023 20:19104,46699,784,78338,652,31002,297,856
13Apr 9, 2023 20:18108,59560,798,69737,167,0003,013,0002,527,232
14Apr 9, 2023 20:18110,36263,927,52139,839,000995,0002,527,232
15Apr 9, 2023 20:18110,87069,813,69840,022,0001,000,0002,265,088
16Apr 9, 2023 20:18111,03262,238,98239,078,0002,004,0002,269,184
17Apr 9, 2023 20:18111,586103,385,05641,286,86002,297,856
18Apr 9, 2023 20:18112,14670,167,37840,482,0001,012,0002,527,232
19Apr 9, 2023 20:18113,09766,586,31240,850,000996,0002,527,232
20Apr 9, 2023 20:18113,38963,912,06540,956,000998,0002,428,928
21Apr 9, 2023 20:18114,43863,575,40141,334,0001,008,0002,433,024
22Apr 9, 2023 20:18115,397115,771,15142,697,00602,293,760
23Apr 9, 2023 20:18115,84367,214,84140,869,0001,993,0002,433,024
24Apr 9, 2023 20:18116,635101,846,19343,155,03602,297,856