Problem3541--【Div3】GESP25年12月四级P1-建造

3541: 【Div3】GESP25年12月四级P1-建造

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

Description



Sample Input Copy

5 5 3
5 5 5 5 5
5 1 5 1 5
5 5 5 5 5
5 2 5 2 5
3 5 5 5 2

Sample Output Copy

40

Source/Category