vanocni.py 187 Bytes
Newer Older
cermak's avatar
cermak committed
1
2
3
4
5
6
7
8
seats = []
while True:
    row = list(map(int, input().split()))
    if row[0] == -1:
        break
    seats.append(row)

print(all(sorted(set(row)) == list(row) for row in zip(*seats)))