My first thought made it unnecessarily difficult. Well, the correct solution falls into a typical pattern: use DP to calc cumulative results of each cell, and then we use a sliding window to find max rect btw. 2 given rows.
转载于:https://www.cnblogs.com/tonix/p/4644420.html