단지번호붙이기
-
boj)2667 - 단지번호붙이기PS/boj 2020. 9. 3. 16:02
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.*; public class Main { static int n, danjiCnt; static int[][] graph = new int[26][26]; static int[] num = new int[26*26]; static boolean dfs (int x, int y) { if (x n || y n) { return false; } // 단지가 될 수 있다면 if (graph[x][y] == 1) { graph[x][y] = 0; num[danjiCnt]++; d..