题解 | #二维数组操作#
二维数组操作
https://www.nowcoder.com/practice/2f8c17bec47e416897ce4b9aa560b7f4
while True: try: m,n = list(map(int,input().split())) x1,y1,x2,y2 = list(map(int,input().split())) x = int(input()) y = int(input()) x3,y3 = list(map(int,input().split())) #1 输入表格的行列值m,n,范围均在【0,9】 if 0 <= m <= 9 and 0 <= n <= 9: print(0) else: print(-1) #2 输入交换的坐标值,横坐标的范围【0,m】,纵坐标的范围【0,n】 if 0 <= x1 < m and 0 <= y1 < n and 0 <= x2 < m and 0 <= y2 < n: print(0) else: print(-1) #3 输入插入的行值,范围【0,m】,同时m需要小于9 if 0 <= x < m and m < 9: print(0) else: print(-1) #4 输入插入的列值,范围【0,n】,同时n需要小于9 if 0 <= y < n and n < 9: print(0) else: print(-1) #5 输入要查询的坐标,范围【0,m】和【0,n】 if 0 <= x3 < m and 0 <= y3 < n: print(0) else: print(-1) except: break