[백준 17090] 미로 탈출 / 자바 / dfs(dfs 코드구현 연습)
#문제 레벨: G5알고리즘: dfs(dfs 코드구현 연습)풀이시간: 힌트 참조 유무:https://www.acmicpc.net/problem/17090#문제 풀이 visted이 0,1,2(방문x, 방문O && 정답아님, 방문O && 정답임) 세가지 상태를 담을 때import java.util.*;public class Main { static int N, M; static char[][] maze; static int[][] visited; static int[] dx = {-1, 0, 1, 0}; // U, R, D, L static int[] dy = {0, 1, 0, -1}; // U, R, D, L public stat..
2024. 8. 16.