시간초과
-
[백준] 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..
-
[백준] 1202 보석 도둑 #JAVA #우선순위 큐Algorithm Solving/BAEKJOON 2021. 12. 26. 14:34
[백준] 1202 보석 도둑 #JAVA #우선순위 큐 코드 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.PriorityQueue; import java.util.StringTokenizer; public class Main { public static void main(String[] args) throws IOException{ BufferedReader br = new BufferedReader(new Inp..