def get_path(pos, matrix): i, j = pos[0], pos[1] n, m = len(matrix), len(matrix[0]) if not 0 <= i < n or not 0 <= j < m or not matrix[i][j] == 0: return global cur_path, res cur_path.append((i, j)) if i == n - 1 and j == m - 1: #到达终点 if not res or len(cur_...