class Solution { public: bool hasPath(vector<vector>& matrix, string word) { int row = matrix.size(); //行 int col = matrix[0].size(); //列 if(matrix.empty() || row<1 || col<1){ return false; } //如果矩阵为空或者行列为0,直接返回false vector<vector<bool> > visited(row, v...