class Solution { public: int flag = 0; //标记是否成功搜索到word int map[205][205]; //标记是否进入过该格子 int rows, columns; int moverow[4] = {0, 0, -1, 1}; int movecol[4] = {1, -1, 0, 0}; //四个移动方向 bool hasPath(vector<vector<char> >& matrix, string word) { rows = (int) matrix.size(); columns ...