题解 | #二维数组操作#

二维数组操作

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

注意初始化范围19,但行列号08

while True:
    try:
        a, b = map(int,input().split())
        c, d, e, f = map(int, input().split())
        g = int(input())
        h = int(input())
        i, j = map(int,input().split())
        
        if 1 <= a <= 9 and 1 <= b <= 9:
            print(0)
        else:
            print(-1)
        if 0<=c<a and 0<=d<b and 0<=e<a and 0<=f<b:
            print(0)
        else:
            print(-1)
        if 0<= g <a and a<9:
            print(0)
        else:
            print(-1)
        if 0<= h <b and b<9:
            print(0)
        else:
            print(-1)
        if 0<=i<a and 0<=j<b:
            print(0)
        else:
            print(-1)
    except:
        break
            
        
全部评论

相关推荐

程序员小白条:找的太晚,别人都是大三实习,然后大四秋招春招的,你大四下了才去实习,晚1年
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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