bfs,AC的,感觉类似腐烂的橘子 int[][] d = new int[][]{{0, 1}, {1, 0}, {0, -1}, {-1, 0}}; public int minSailCost(int[][] input) { // write code here int m = input.length, n = input[0].length; boolean[][] is = new boolean[m][n]; int[][] dp = new int[m][n]; for (...