题解 | 二维数组操作

m,n=map(int,input().split())
if(m>9 or n>9):
    print(-1)
else:
    print(0)
x1,y1,x2,y2=map(int,input().split())
if(0<=x1<m and 0<=x2<m and 0<=y1<n and 0<=y2<n):
    print(0)
else:
    print(-1)
x=int(input())
if(0<=x<m and m+1<=9):
    # m+=1
    print(0)
else:
    print(-1)
y=int(input())

if(0<=y<n and n+1<=9):
    # n+=1
    print(0)
else:
    print(-1)
a,b=map(int,input().split())
if(0<=a<m and 0<=b<n):
    print(0)
else:
    print(-1)




m,n=map(int,input().split())
if(m>9 or n>9):
    print(-1)
else:
    print(0)
x1,y1,x2,y2=map(int,input().split())
if(0<=x1<m and 0<=x2<m and 0<=y1<n and 0<=y2<n):
    print(0)
else:
    print(-1)
x=int(input())
if(0<=x<m and m+1<=9):
    # m+=1
    print(0)
else:
    print(-1)
y=int(input())

if(0<=y<n and n+1<=9):
    # n+=1
    print(0)
else:
    print(-1)
a,b=map(int,input().split())
if(0<=a<m and 0<=b<n):
    print(0)
else:
    print(-1)

全部评论

相关推荐

数学转码崽:一直给我推,投了又不理,理了又秒挂
点赞 评论 收藏
分享
饼子吃到撑:当我看到外企的时候,我就知道这大概率可能是真的
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务