题解 | #二维数组操作#

二维数组操作

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


def func():
    m, n = list(map(int, input().split()))
    if 1 <= m <= 9 and 1 <= n <= 9:
        print('0')
    else:
        print('-1')

    x1, y1, x2, y2 = list(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 < 9:
        print('0')
    else:
        print('-1')

    y = int(input())
    if 0 <= y < n and n < 9:
        print('0')
    else:
        print('-1')

    x, y = list(map(int, input().split()))
    
    if 0 <= x < m and 0 <= y < n:
        print('0')
    else:
        print('-1')

while True:
    try:
        func()
    except EOFError:
        break














全部评论

相关推荐

accaacc:2到4k,不是2k到4k,所以年薪是30块
点赞 评论 收藏
分享
把球:这个听过,你加了就会发现是字节的hr
点赞 评论 收藏
分享
点赞 收藏 评论
分享
牛客网
牛客企业服务