ADA Classes - November 8
Vasya and matrix
Mother gave Vasya a rectangular matrix n by m. Each cell of the matrix contains one integer. Vasya played a lot of math games with it: he found its determinant and powered it into some degrees.
But such games made him a little tired, so he invented a new entertainment: he choose an integer k and tries to find a submatrix of maximal area with total sum of numbers in it not greater than k. The submatrix is a rectangular area of matrix.
The first line contains three integers n, m and k (1 ≤ n, m ≤ 300, 1 ≤ k ≤
Each of the next n lines contains m nonnegative integers, each no more than 1000.
Print the area of maximal submatrix, which sum of numbers is not greater than k.
1 3 4 8 6 4
3 3 12 7 5 7 8 4 8 4 3 2