2855: 行于矩阵(walk)

[提交] [状态] [讨论版] [命题人:]

样例输入 Copy

1 1
233


样例输出 Copy

233

3 4
1 0 0 0
1 0 0 0
1 1 1 0

0

3 4
7 3 3 1
4 8 3 6
7 7 7 3

3