HackerRank

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.hackerrank.com/challenges/mr-k-marsh/editorial

原文地址:https://www.cnblogs.com/tonix/p/4644420.html