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 22, 2023 21:42mmalczakmmalczakError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 22, 2023 21:4000000Error: expected "429496497962 ", got "429496497925 "
2Sep 22, 2023 21:4372,51451,966,93824,843,0001,987,0002,289,664
3Sep 22, 2023 21:4372,57658,522,21324,864,0001,989,0002,289,664
4Sep 22, 2023 21:4272,59553,989,77824,871,0001,989,0002,289,664
5Sep 22, 2023 21:4372,81450,297,19726,941,00002,273,280
6Sep 22, 2023 21:4272,84951,644,45625,956,000998,0002,273,280
7Sep 22, 2023 21:4272,85156,073,63025,957,000998,0002,289,664
8Sep 22, 2023 21:4372,90050,757,87324,975,0001,998,0002,289,664
9Sep 22, 2023 21:4372,90549,615,13924,977,0001,998,0002,527,232
10Sep 22, 2023 21:4272,91152,229,48024,979,0001,998,0002,289,664
11Sep 22, 2023 21:4273,00055,223,07225,010,0002,000,0002,289,664
12Sep 22, 2023 21:4273,01149,668,00426,014,0001,000,0002,277,376
13Sep 22, 2023 21:4273,06248,259,14325,031,0002,002,0002,289,664
14Sep 22, 2023 21:4373,10049,224,91225,044,0002,003,0002,408,448
15Sep 22, 2023 21:4373,15149,686,48825,062,0002,004,0002,277,376
16Sep 22, 2023 21:4373,19550,719,23825,076,0002,006,0002,289,664
17Sep 22, 2023 21:4273,20850,728,24625,081,0002,006,0002,269,184
18Sep 22, 2023 21:4273,24656,309,86625,094,0002,007,0002,289,664
19Sep 22, 2023 21:4373,25147,127,48126,100,0001,003,0002,281,472
20Sep 22, 2023 21:4275,65687,361,31427,992,57802,265,088
21Sep 22, 2023 21:4375,669104,222,33627,997,45502,265,088
22Sep 22, 2023 21:4275,72191,488,35128,016,67202,269,184
23Sep 22, 2023 21:4275,802102,689,40328,046,70202,265,088
24Sep 22, 2023 21:4375,94395,250,99728,098,83802,265,088
25Sep 22, 2023 21:4376,01585,626,92028,125,62902,269,184