topic
The Description
_AP oxen to prepare yourself to build a very magnificent palace. Therefore, his eyes a rectangular open space of N * M. Each grid space has its own altitude. AP wanted his palace with an average elevation of above sea level (assuming that sea level is 0, the average will count it?). Moreover, AP wants his palace as large as possible to accommodate more people to worship him. Will the final AP palace will be?
Input Format
The first line N and M. After N rows, each row number M, altitude space described.
Output Format
output line, represents the largest area of the palace.
_
The Sample the Input
. 3 2
. 4 0
-10. 8
-2 -2
Sample Output
4
Data Limit
of 30% of the data, N, M≤50;
to 100% of the data, N, M≤200;
analysis
At first glance I thought it was the largest sub-matrix, but found that did not seem to satisfy the principle of optimality, look at the data range, should be an $ n ^ 3 $ algorithm