[백준2178] 미로 탐색
[백준2178] 미로 탐색 제한조건 시간 : 1초 메모리 : 192M 입력 첫째 줄에 두 정수 N, M(2 ≤ N, M ≤ 100)이 주어진다. 다음 N개의 줄에 M개열의 정수 미로가 주어진다. 출력 지나야 하는 최소의 칸 수. 시작 칸을 1 부터 셈한다. 자료구조 Array static int[] dx = { 0, 0, 1, -1 }; static int[] dy = { 1, -1, 0, 0 }; static int[][] map; static int[][] cost; static boolean[][] visited; static int N, M, i, j, steps; static class Cell { int x; int y; int c; Cell(int x, int y, int c) { this...
2021. 10. 24.