题解 | #二维数组操作#
二维数组操作
http://www.nowcoder.com/practice/2f8c17bec47e416897ce4b9aa560b7f4
'''
这道题是阅读理解题,没多大难度,考验读题耐心
'''
while True:
try:
m, n = list(map(int,input().split( )))
x1, y1, x2, y2 = list(map(int, input().split( )))
insert_x = int(input())
insert_y = int(input())
x, y = list(map(int, input().split()))
if 0 <= m < 10 and 0 <= n < 10:
print(0)
else:
print(-1)
if 0 <= x1 <= m-1 and 0 <= x2 <= m-1 and 0 <= y1 <= n-1 and 0 <= y2 <= n-1:
print(0)
else:
print(-1)
if 0 <= insert_x <= m-1 and m <= 8:
print(0)
else:
print(-1)
if 0 <= insert_y <= n-1 and n <= 8:
print(0)
else:
print(-1)
if 0 <= x <=m-1 and 0 <= y <= n-1:
print(0)
else:
print(-1)
except:
break
这道题是阅读理解题,没多大难度,考验读题耐心
'''
while True:
try:
m, n = list(map(int,input().split( )))
x1, y1, x2, y2 = list(map(int, input().split( )))
insert_x = int(input())
insert_y = int(input())
x, y = list(map(int, input().split()))
if 0 <= m < 10 and 0 <= n < 10:
print(0)
else:
print(-1)
if 0 <= x1 <= m-1 and 0 <= x2 <= m-1 and 0 <= y1 <= n-1 and 0 <= y2 <= n-1:
print(0)
else:
print(-1)
if 0 <= insert_x <= m-1 and m <= 8:
print(0)
else:
print(-1)
if 0 <= insert_y <= n-1 and n <= 8:
print(0)
else:
print(-1)
if 0 <= x <=m-1 and 0 <= y <= n-1:
print(0)
else:
print(-1)
except:
break
【牛客站内】华为机试题—简单 文章被收录于专栏
【牛客站内】华为机试题练习记录