#P1324. Exca王者之剑

Exca王者之剑

Description

image

image

Input Format

第一行给出数字N,M代表行列数.N,M均小于等于100

下面N行M列用于描述数字矩阵

Output Format

输出最多可以拿到多少块宝石
2 2 
1 2
2 1
4

Source

2007Amber国家队论文