[JAVA] SWEA 1226 미로1 [BFS, DFS]
전체 코드 import java.util.LinkedList; import java.util.Queue; import java.util.Scanner; public class SWEA_1226_미로1 { static int[] dy = { 1, -1, 0, 0 }; //상, 하, 우, 좌 static int[] dx = { 0, 0, 1, -1 }; static int chk; //도달유무 체크값 static class Point{ // bfs 사용시 필요한 좌표 클래스 int y, x; Point(int y, int x){ this.y = y; this.x = x; } } public static void main(String[] args) { Scanner sc = new Scanner(System...
2020. 8. 17.