def gather_block(row, col, sudoku):
    """收集二维数组sudoku(mxm)中元素(row, col)所在的宫中的元素的列表"""
    blocks = []
    i = row // 3
    j = col // 3
    for k in range(i*3, (i+1)*3):
        blocks += sudoku[k][j*3 : (j+1)*3]
    return blocks