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 12:01mmalczakmmalczakScore: 116,159Success
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 12:0199,491107,032,58836,811,51902,269,184
2Sep 16, 2023 12:0099,525109,336,40836,824,23702,273,280
3Sep 16, 2023 12:0099,836100,686,37736,939,48802,269,184
4Sep 16, 2023 12:01100,200106,874,56937,074,07402,277,376
5Sep 16, 2023 12:01100,20592,349,73637,076,00702,269,184
6Sep 16, 2023 12:00100,224103,927,75437,082,95302,260,992
7Sep 16, 2023 12:01114,95967,456,25141,523,0001,012,0002,289,664
8Sep 16, 2023 12:00114,99567,901,03041,535,0001,013,0002,269,184
9Sep 16, 2023 12:01115,07868,410,69641,566,0001,013,0002,289,664
10Sep 16, 2023 12:00115,73570,206,96441,827,000995,0002,269,184
11Sep 16, 2023 12:00115,76867,524,65640,842,0001,992,0002,289,664
12Sep 16, 2023 12:00116,04665,751,41340,940,0001,997,0002,289,664
13Sep 16, 2023 12:01116,15969,496,75040,980,0001,999,0002,269,184
14Sep 16, 2023 12:00116,31666,094,28741,036,0002,001,0002,289,664
15Sep 16, 2023 12:01116,61468,447,99641,141,0002,006,0002,281,472
16Sep 16, 2023 12:00116,69570,401,14641,169,0002,008,0002,289,664
17Sep 16, 2023 12:01116,85467,518,36241,225,0002,011,0002,289,664
18Sep 16, 2023 12:00116,87665,960,09442,239,0001,005,0002,531,328
19Sep 16, 2023 12:00117,04367,130,61641,292,0002,014,0002,289,664
20Sep 16, 2023 12:01117,16864,294,92942,344,0001,008,0002,273,280
21Sep 16, 2023 12:01117,19270,624,94542,353,0001,008,0002,277,376
22Sep 16, 2023 12:00117,23068,222,73142,367,0001,008,0002,289,664
23Sep 16, 2023 12:01117,41168,372,87843,442,00002,289,664
24Sep 16, 2023 12:01117,46266,323,30542,451,0001,010,0002,273,280