题解 | #二维数组操作#

二维数组操作

http://www.nowcoder.com/practice/2f8c17bec47e416897ce4b9aa560b7f4

while 1:
    try:
        m, n = map(int, input().split())
        x1, y1, x2, y2 = map(int, input().split())
        x = int(input())
        y = int(input())
        xx, yy = map(int, input().split())
        if m >= 0 and n >= 0 and m <= 9 and n <= 9:
            print(0)
        else:
            print(-1)
        if x1 >= 0 and y1 >= 0 and x1 <= m-1 and y1 <= n-1 and x2 >= 0 and y2 >= 0 and x2 <= m-1 and y2 <= n-1:
            print(0)
        else:
            print(-1)
        if x >= 0 and x <= m-1 and m+1 <= 9:
            print(0)
        else:
            print(-1)
        if y >= 0 and y <= n-1 and n+1 <= 9:
            print(0)
        else:
            print(-1)
        if xx >= 0 and xx <= m-1 and yy >= 0 and yy <= n-1:
            print(0)
        else:
            print(-1)
    except:
        break
全部评论

相关推荐

11-04 19:05
已编辑
东莞城市学院 单片机
不知道怎么取名字_:你这个要实习两年?哪有这么久的,感觉就是即使你毕业了,但还按实习的话,是不是不用给你缴社保公积金啥的
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务