[백준][그래프][2667] 단지번호붙이기
import java.util.ArrayList; import java.util.LinkedList; import java.util.Queue; import java.util.Scanner; class Pair{ int x; int y; Pair(int x, int y){ this.x = x; this.y = y; } } public class Graph { public static final int[] dx = {0, 0, 1, -1}; public static final int[] dy = {1, -1, 0, 0}; static void bfs(int[][] arr, int[][] group, int x, int y, int n, int cnt){ Queue queue = new LinkedList(..