题解 | #二维数组操作#

二维数组操作

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)
全部评论

相关推荐

xtu大迫杰:偶遇校友,祝校友offer打牌
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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