백준 1012 java
-
boj)1012 - 유기농 배추PS/boj 2020. 9. 3. 17:00
import java.io.*; import java.util.StringTokenizer; public class Main { static int t, m, n, k, x, y, ans; static int[][] graph = new int[50][50]; public static boolean dfs(int x, int y) { if (x = m || y = n) { return false; } if (graph[x][y] == 1) { graph[x][y] = 0; dfs(x - 1, y); dfs(x + 1, y); dfs(x, y - 1); dfs(x, y + 1); return true; } return false; } public static void m..