Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def sol(table_sorted, n):
- Wt, Ht = table_sorted[0], table_sorted[1]
- price = float("infinity")
- for i in range(n):
- cloth = [int(i) for i in input().split()]
- Wc, Hc = min(cloth[0], cloth[1]), max(cloth[0], cloth[1])
- if Wc >= Wt and Hc >= Ht:
- price = min(price, cloth[2])
- return price
- n = int(input())
- print(sol(sorted(tuple([int(i) for i in input().split()])), n))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement