看代码就行啦,很好理解~ #include<iostream> #include<vector> using namespace std; vector<int> drow = {1,0,0,-1}; vector<int> dcol = {0,1,-1,0}; vector<vector<int> > res; bool calShorestPath(vector<vector<int> >&grid, int r, int c, int m, int n){ grid[r]...