Range Addition II

Problem Id: 598 Difficulty: Easy


Intuition

Solution


class Solution:
    def maxCount(self, m: int, n: int, ops: List[List[int]]) -> int:
        if not ops:
            return m * n

        m1 = min([i[0] for i in ops])
        n1 = min([i[1] for i in ops])
        return m1 * n1