Range Addition II
这题所有的输入操作全都是基于0,0开始的,我们知道了这一点的话,就只需要找那个所有范围都覆盖了的最大矩形的面积就行了
class Solution(object):
def maxCount(self, m, n, ops):
"""
:type m: int
:type n: int
:type ops: List[List[int]]
:rtype: int
"""
row, col = [], []
for i, j in ops:
row.append(i)
col.append(j)
return min(row) * min(col) if ops else n * m