cf/mirror

Optimal Sum

CF
182C2000· candidate master2s256 MB⌨ stdin/stdout

Examples

Sample 1of 3
Input
5 3
0 -2 3 -5 1
2
Output
10
Sample 2of 3
Input
5 2
1 -3 -10 4 1
3
Output
14
Sample 3of 3
Input
3 3
-2 -5 4
1
Output
11
182C.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)