Problem2623--蓝桥杯练习(2022年3月真题)猴子摘桃子

2623: 蓝桥杯练习(2022年3月真题)猴子摘桃子

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MB

Description



Sample Input Copy

2 3
1 4 5
5 4 6

Sample Output Copy

16

Source/Category