Gaaaaaaaaaarden
-
[백준] 18809 Gaaaaaaaaaarden #JAVA #백트래킹 #bfsAlgorithm Solving/BAEKJOON 2022. 1. 12. 14:34
[백준] 18809 Gaaaaaaaaaarden #JAVA #백트래킹 #bfs 오랜 시간이 걸려서 풀었던 문제. 코드 import java.io.*; import java.util.*; public class Main { static List baeyang; static int N,M,G,R; static int[][] garden; static int[] selectBaeyang; static int[] selectGR; static boolean[] isUsedBaeyang; static int[] spotG, spotR; static int[] dx = {0,1,0,-1}; static int[] dy = {1,0,-1,0}; static int max = 0; public static void m..