Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def strict(f):
- f = sorted(f, key=lambda x:x[0])
- x = f[0]
- for el in f:
- if el[0] == x[0] and el[1] != x[1]: # se x=x e y!=y
- return False # FALSE
- if el[0] != x[0] and el[1] == x[1]: # se x!=x e y=y
- return False
- x = el
- y=f[0][0]
- for el in f:
- if el[1] < y:
- return False
- y = el[1]
- return True
- strict(f)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement