Problem1172--蚂蚁寻路

1172: 蚂蚁寻路

Time Limit: 10 Sec  Memory Limit: 512 MB
Submit: 1  Solved: 1
[Submit] [Status] [Web Board] [Creator:]

Description

Input

在输入文件 ant.in 中,第一行三个数 n,m,k。意义如题目描述。 接下来一个 n 行 m 列的整数矩阵,表示棋盘。

Output

在输出文件 ant.out 中,一个数,表示蚂蚁所走路径围出的图形可能的最大权 值和。

Sample Input Copy

2 5 2
-1 -1 -1 -1 -1
-1 -1 -1 -1 -1

Sample Output Copy

-8

HINT

Source/Category