3197
-
[백준] 3197 백조의 호수 #JAVA #BFS #시간초과Algorithm Solving/BAEKJOON 2022. 1. 13. 12:10
[백준] 3197 백조의 호수 #JAVA #BFS #시간초과 코드 import java.io.*; import java.util.*; public class Main { static int[] dx = {0,1,0,-1}; static int[] dy = {1,0,-1,0}; static int R, C; static char[][] map; static boolean[][] visSwan, visWater; static Queue waterQ, waterNextQ, swanQ, swanNextQ; static int startX, startY, endX, endY; public static void main(String[] args) throws IOException { BufferedReader br..