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:51mmalczakmmalczakScore: 98,838Success
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:5297,61458,799,48134,111,0002,006,0002,277,376
2Sep 16, 2023 11:5297,77061,274,56534,166,0002,009,0002,269,184
3Sep 16, 2023 11:5197,88157,905,86734,204,0002,012,0002,273,280
4Sep 16, 2023 11:5297,95461,276,37034,230,0002,013,0002,289,664
5Sep 16, 2023 11:5197,97357,603,47234,237,0002,013,0002,273,280
6Sep 16, 2023 11:5198,13069,813,62934,291,0002,017,0002,277,376
7Sep 16, 2023 11:5298,15958,417,38335,311,0001,008,0002,281,472
8Sep 16, 2023 11:5298,29557,924,77634,349,0002,020,0002,265,088
9Sep 16, 2023 11:5198,35761,679,08135,382,0001,010,0002,289,664
10Sep 16, 2023 11:5298,40567,603,16634,388,0002,022,0002,289,664
11Sep 16, 2023 11:5198,49760,852,01835,432,0001,012,0002,277,376
12Sep 16, 2023 11:5198,57064,913,16934,445,0002,026,0002,277,376
13Sep 16, 2023 11:5298,83861,953,48136,570,00002,289,664
14Sep 16, 2023 11:5199,14666,816,40835,665,0001,019,0002,289,664
15Sep 16, 2023 11:5299,24198,802,42336,719,20402,273,280
16Sep 16, 2023 11:5299,420116,370,18436,785,47602,269,184
17Sep 16, 2023 11:5199,58469,048,16034,855,0001,991,0002,289,664
18Sep 16, 2023 11:5199,584114,186,29836,845,90802,256,896
19Sep 16, 2023 11:5299,59562,175,52535,855,000995,0002,396,160
20Sep 16, 2023 11:5199,77363,629,49434,921,0001,995,0002,289,664
21Sep 16, 2023 11:52100,454100,884,75837,168,06602,273,280
22Sep 16, 2023 11:51100,691101,526,02637,255,64702,277,376
23Sep 16, 2023 11:51100,91697,179,23137,339,05402,265,088
24Sep 16, 2023 11:52101,85967,987,24137,688,00002,273,280