Wouldn't the constrained that output area should be for a rectangle cause a problem?
Is it DP? I think DP is O(N^3)? That will be a funny way(Matlab) to solve this...
there is O(m*n) solution for problem 1.
Wouldn't the constrained that output area should be for a rectangle cause a problem?
Is it DP? I think DP is O(N^3)? That will be a funny way(Matlab) to solve this...
there is O(m*n) solution for problem 1.