/* //方法一,深度优先遍历 class Solution { public: int movingCount(int threshold, int rows, int cols) { static int count=0; vector<vector> matrix(rows); //0为没走过,-1为走不了,1为走过了 for(int i=0;i<rows;i++) { matrix[i].resize(cols); for(int j=0;j<cols;j++) matrix[i][j]=0; } DFS(matrix,threshold,0,0,rows,c...