void bfs(int[][] b, int r, int c, int[] max, boolean[][] f) {
		Queue<int[]> q=new ArrayDeque<>();
		int curMax=0;
		f[r][c]=true;
		q.offer(new int[]{r,c});
		int m=b.length;
		int n=b[0].length;
		while (!q.isEmpty()) {
			++curMax;
			int[] id=q.poll();
			int i=id[0],j=id[1];
			int v=b[i][j]+1;
			if (i+1<m&&b[i+1][j]==v) {q.offer(new int[]{i+1,j}); f[i+1][j]=true;};
			if (i-1>=0&&b[i-1][j]==v) {q.offer(new int[]{i-1,j}); f[i-1][j]=true;};
			if (j+1<n&&b[i][j+1]==v) {q.offer(new int[]{i,j+1}); f[i][j+1]=true;};
			if (j-1>=0&&b[i][j-1]==v) {q.offer(new int[]{i,j-1}); f[i][j-1]=true;};
		}
		max[1]=Math.max(max[1], curMax);
	}