poj1050(限定矩阵大小的最大子矩阵问题)

限定矩阵大小的最大子矩阵问题,具体参见poj1050:http://poj.org/problem?id=1050
input:The input consists of an N * N array of integers. The input begins with a single positive integer N on a line by itself, indicating the size of the square two-dimensional array. This is followed by N^2 integers separated by whitespace (spaces and newlines). These are the N^2 integers of the array, presented in row-major order. That is, all numbers in the first row, left to right, then all numbers in the second row, left to right, etc. N may be as large as 100. The numbers in the array will be in the range [-127,127].
output:Output the sum of the maximal sub-rectangle.
sample input:
4
0 -2 -7 0 9 2 -6 2
-4 1 -4  1 -1

8  0 -2
sample output:
15