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 16, 2023 16:49mmalczakmmalczakScore: 95,600Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 16, 2023 16:5293,42458,077,78234,567,00002,273,280
2Sep 16, 2023 16:5294,260101,297,72334,876,15802,273,280
3Sep 16, 2023 16:4994,460133,949,97734,950,23102,260,992
4Sep 16, 2023 16:5294,62798,453,72235,012,15402,252,800
5Sep 16, 2023 16:4994,69760,400,98333,036,0002,002,0002,289,664
6Sep 16, 2023 16:4994,753107,576,41135,058,59702,273,280
7Sep 16, 2023 16:5294,81462,495,82234,079,0001,002,0002,289,664
8Sep 16, 2023 16:4994,938102,541,42135,127,17002,260,992
9Sep 16, 2023 16:5294,985117,959,75735,144,52102,260,992
10Sep 16, 2023 16:5295,39758,122,11733,280,0002,017,0002,273,280
11Sep 16, 2023 16:4995,49261,993,91734,351,000981,0002,273,280
12Sep 16, 2023 16:4995,52459,382,35234,335,0001,009,0002,289,664
13Sep 16, 2023 16:4995,60063,032,20134,362,0001,010,0002,289,664
14Sep 16, 2023 16:5295,92463,221,42834,478,0001,014,0002,281,472
15Sep 16, 2023 16:5295,97659,629,66335,511,00002,269,184
16Sep 16, 2023 16:5296,10362,375,32534,543,0001,015,0002,359,296
17Sep 16, 2023 16:5296,22466,082,17635,603,00002,289,664
18Sep 16, 2023 16:5296,35461,767,18734,633,0001,018,0002,383,872
19Sep 16, 2023 16:4996,89263,968,22933,859,0001,991,0002,281,472
20Sep 16, 2023 16:5297,07356,601,05234,920,000997,0002,289,664
21Sep 16, 2023 16:4997,13259,040,66334,941,000998,0002,359,296
22Sep 16, 2023 16:4997,15962,044,70933,952,0001,997,0002,289,664
23Sep 16, 2023 16:4997,27358,056,77733,992,0001,999,0002,289,664
24Sep 16, 2023 16:4997,58964,575,79335,105,0001,003,0002,289,664