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:46mmalczakmmalczakScore: 73,114Success
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:4472,61154,610,97625,871,000995,0002,289,664
2Sep 22, 2023 21:4472,61451,565,05624,877,0001,990,0002,289,664
3Sep 22, 2023 21:4672,62753,058,75224,882,0001,990,0002,289,664
4Sep 22, 2023 21:4472,63854,174,64024,886,0001,990,0002,277,376
5Sep 22, 2023 21:4672,64151,189,23225,844,0001,033,0002,277,376
6Sep 22, 2023 21:4672,65751,852,94224,892,0001,991,0002,289,664
7Sep 22, 2023 21:4472,82749,497,12224,950,0001,996,0002,269,184
8Sep 22, 2023 21:4472,84652,557,93224,957,0001,996,0002,269,184
9Sep 22, 2023 21:4672,93057,305,14524,986,0001,998,0002,289,664
10Sep 22, 2023 21:4672,95759,888,75124,995,0001,999,0002,289,664
11Sep 22, 2023 21:4472,96548,490,31425,998,000999,0002,289,664
12Sep 22, 2023 21:4673,02250,621,97325,017,0002,001,0002,265,088
13Sep 22, 2023 21:4473,11454,513,51825,049,0002,003,0002,289,664
14Sep 22, 2023 21:4673,11951,441,38825,050,0002,004,0002,289,664
15Sep 22, 2023 21:4673,14148,463,18926,060,0001,002,0002,273,280
16Sep 22, 2023 21:4673,21449,829,64225,083,0002,006,0002,351,104
17Sep 22, 2023 21:4473,27351,226,36326,107,0001,004,0002,289,664
18Sep 22, 2023 21:4473,41950,026,77525,153,0002,012,0002,289,664
19Sep 22, 2023 21:4675,69088,075,65228,005,31002,265,088
20Sep 22, 2023 21:4475,78599,945,12228,040,33302,277,376
21Sep 22, 2023 21:4475,78899,851,84428,041,58202,269,184
22Sep 22, 2023 21:4475,876104,667,53728,074,09902,273,280
23Sep 22, 2023 21:4675,99295,019,09628,117,00002,281,472
24Sep 22, 2023 21:4676,19993,823,30828,193,48902,273,280