1725. Number Of Rectangles That Can Form The Largest Square
Содержание
class Solution:
def countGoodRectangles(self, rectangles: List[List[int]]) -> int:
res = mx = 0
for l, w in rectangles:
x = min(l, w)
if mx < x:
res = 1
mx = x
elif mx == x:
res += 1
return res