题解 | #二维数组操作#
二维数组操作
https://www.nowcoder.com/practice/2f8c17bec47e416897ce4b9aa560b7f4
import sys while True: try: m, n = map(int, input().strip().split()) x1, y1, x2, y2 = map(int, input().strip().split()) x = int(input()) y = int(input()) xf, yf = map(int, input().strip().split()) if 0 < m < 10 and 0 < n < 10: print(0) else: print(-1) if 0 <= x1 < m and 0 <= x2 < m and 0 <= y1 < n and 0 <= y2 < n: print(0) else: print(-1) if m != 9 and x < m: print(0) else: print(-1) if n != 9 and y < n: print(0) else: print(-1) if 0 <= xf < m and 0 <= yf < n: print(0) else: print(-1) except: break