Skip to content

Instantly share code, notes, and snippets.

@cixuuz
Created October 22, 2017 20:20
Show Gist options
  • Save cixuuz/1a2bd54841176a53b76bf9f2ed11121c to your computer and use it in GitHub Desktop.
Save cixuuz/1a2bd54841176a53b76bf9f2ed11121c to your computer and use it in GitHub Desktop.
[598. Range Addition II] #leetcode
class Solution(object):
def maxCount(self, m, n, ops):
"""
:type m: int
:type n: int
:type ops: List[List[int]]
:rtype: int
"""
for i, j in ops:
m = min(m, i)
n = min(n, j)
return m*n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment