[백준] 6593 : 상범 빌딩 -JAVA - 사좋배 공유
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.LinkedList; import java.util.Queue; import java.util.StringTokenizer; public class Main { static int dx[]= {-1,0,1,0,0,0}; static int dy[] = {0,1,0,-1,0,0}; static int dh[]= {0,0,0,0,1,-1}; static char[][][]building; static boolean[][][] visit; static int L; static int R; static int C; s..
[백준] 4963 : 섬의 개수 -JAVA - 사좋배 공유
import java.util.LinkedList; import java.util.Queue; import java.util.Scanner; public class Main { static int[][] arr; static int dx[]= {-1,-1,0,1,1,1,0,-1}; static int dy[]= {0,1,1,1,0,-1,-1,-1}; static int w,h; static int count; static Queue q; static int result; static boolean [][]visit; public static void main(String[] args) { Scanner sc = new Scanner(System.in); while(true) { w = sc.nextInt..