DFS 深度优先搜索 def dfs(matrix, x, y, path, dst): if (x,y) == dst: path.append((x,y)) for i in path: print("({},{})".format(i[0],i[1])) return if not 0<=x<len(matrix) or not 0<=y<len(matrix[0])\ or matrix[x][y] == 1 or (x,y) in path:...