cf/mirror

Smithing Skill

CF
1989D1900· candidate master3s256 MB⌨ stdin/stdout

Examples

Sample 1of 3
Input
5 3
9 6 7 5 5
8 4 5 1 2
10 4 7
Output
12
Sample 2of 3
Input
3 4
10 20 20
0 0 0
9 10 19 20
Output
8
Sample 3of 3
Input
1 5
3
1
1000000000 1000000000 1000000000 1000000000 1000000000
Output
4999999990
1989D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)