public class Solution { boolean [][]visited;//保证了格子不会重复计数 public int movingCount(int threshold, int rows, int cols) { visited = new boolean[rows][cols];//默认是false return dfs(threshold,rows,cols,0,0,0,0);//从00开始,位数和为00 } private int dfs(int k, int rows, int cols,i...