Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #https://inf-ege.sdamgia.ru/problem?id=45260
- data = open('107_26.txt').readlines()
- n = int(data[0])
- field = {}
- for i in range(1, n + 1):
- x, y = map(int, data[i].split())
- if x not in field:
- field[x] = []
- field[x].append(y)
- for e in field:
- field[e].sort()
- answ = (0, 100001)
- for e in field: #e -- номер ряда
- for i in range(1, len(field[e])):
- if field[e][i] - field[e][i - 1] - 1 == 13:
- if e > answ[0]: #если текущий номер ряда больше чем номер ряда в ответе
- answ = (e, field[e][i - 1] + 1)
- print(answ)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement