题解 | #二维数组操作#
二维数组操作
http://www.nowcoder.com/practice/2f8c17bec47e416897ce4b9aa560b7f4
while True:
try:
m, n = (int(x) for x in input().split())
x0, y0, x1, y1 = (int(x) for x in input().split())
x = int(input())
y = int(input())
r, c = (int(x) for x in input().split())
except EOFError:
break
print(0 if 0 < m <= 9 and 0 < n <= 9 else -1)
print(0 if 0 <= x0 < m and 0 <= y0 < n and 0 <= x1 < m and 0 <= y1 < n else -1)
print(0 if 0 <= x < m and m < 9 else -1)
print(0 if 0 <= y < n and n < 9else -1)
print(0 if 0 <= r < m and 0 <= c < n else -1)
查看3道真题和解析
