4552: P7074 [CSP-J2020] 方格取数
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:6
Solved:0
Description

Input

Output

Sample Input Copy
输入 #1
3 4
1 -1 3 2
2 -1 4 -1
-2 2 -3 -1
输入 #2
2 5
-1 -1 -3 -2 -7
-2 -1 -4 -1 -2
Sample Output Copy
输出 #1
9
输出 #2
-10
HINT
