1.矩阵中的路径 class Solution { int dx[4] = {0, -1, 0, 1}, dy[4] = {1, 0, -1, 0}; bool dfs(vector<vector<char>>& matrix, int x, int y, string& word, int idx) { if (matrix[x][y] != word[idx]) return false; if (idx == word.size() - 1) return true; char ch ...