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 11:42mmalczakmmalczakScore: 98,576Success
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 11:4197,08457,041,83033,926,0001,995,0002,281,472
2Sep 16, 2023 11:4297,61958,969,23634,113,0002,006,0002,289,664
3Sep 16, 2023 11:4297,64358,113,30934,121,0002,007,0002,289,664
4Sep 16, 2023 11:4197,68160,913,20435,139,0001,003,0002,289,664
5Sep 16, 2023 11:4197,73557,733,81535,158,0001,004,0002,531,328
6Sep 16, 2023 11:4197,81161,040,16034,180,0002,010,0002,289,664
7Sep 16, 2023 11:4297,94664,304,77334,227,0002,013,0002,289,664
8Sep 16, 2023 11:4198,17856,897,25734,308,0002,018,0002,531,328
9Sep 16, 2023 11:4198,22258,738,20934,323,0002,019,0002,371,584
10Sep 16, 2023 11:4198,32767,852,43535,371,0001,010,0002,289,664
11Sep 16, 2023 11:4298,43058,309,37334,396,0002,023,0002,289,664
12Sep 16, 2023 11:4298,51458,887,10234,425,0002,025,0002,289,664
13Sep 16, 2023 11:4198,57664,058,60336,473,00002,273,280
14Sep 16, 2023 11:4298,57859,992,64435,461,0001,013,0002,289,664
15Sep 16, 2023 11:4298,68158,635,02535,498,0001,014,0002,277,376
16Sep 16, 2023 11:4298,80359,801,18936,557,00002,387,968
17Sep 16, 2023 11:4298,88664,172,99036,588,00002,273,280
18Sep 16, 2023 11:4299,281103,188,61836,733,94702,269,184
19Sep 16, 2023 11:4199,55089,596,57736,833,34202,269,184
20Sep 16, 2023 11:4299,826104,671,43236,935,72202,260,992
21Sep 16, 2023 11:41100,11459,496,57435,040,0002,002,0002,289,664
22Sep 16, 2023 11:41100,320135,570,77737,118,41902,269,184
23Sep 16, 2023 11:42100,495115,458,66137,183,04902,273,280
24Sep 16, 2023 11:41100,52395,045,65037,193,40402,256,896