1 人解决，1 人已尝试。
2 份提交通过，共有 2 份提交。
8.9 EMB 奖励。
单点时限: 1.5 sec
内存限制: 512 MB
Once upon a time, there was a little dog YK. One day, he went to an antique shop and was impressed by a beautiful picture. YK loved it very much. However, YK did not have money to buy it. He begged the shopkeeper Bob whether he could have it without spending money.
Fortunately, Bob enjoyed puzzle game. He promised to give YK a picture for free if YK can solve a puzzle game for him.
Bob drew a puzzle board, which was a matrix consisting of cells. And there was an integer in each cell. A sub-matrix was a matrix that was a continuous part of the puzzle board (The whole puzzle board could also be called a sub-matrix). The value of a sub-matrix meant the sum of integers in the cells of the sub-matrix. The sub-matrix which had the largest value was called “The largest sub-matrix”. Bob wanted to make the value of the largest sub-matrix as small as possible by selecting one cell on the board and changed the integer in it into . But if making that kind of change would not do anything good, he didn’t have to change any cell.
In such a situation, YK needed to calculate the minimum value of the largest sub-matrix Bob could get.
The first line contains three integers, above mentioned , and ().
Then lines follow. Each line contains integers ().
These lines are the integers in the cells of the puzzle board.
Output the minimum value of the largest sub-matrix Bob could get.
3 3 -10 -100 4 4 4 -10 4 4 4 1
3 3 -1 -2 -2 -2 -2 -2 -2 -2 -2 -2