[백준 14923번] 미로 탈출
from collections import deque dx = [-1,1,0,0] dy = [0,0,-1,1] n, m = map(int,input().split()) hx, hy = map(int,input().split()) ex, ey = map(int,input().split()) maze = [list(map(int,input().split())) for _ in range(n)] visited = [[[0]*m for _ in range(n)] for _ in range(2)] def bfs(): visited[0][hx-1][hy-1] = 0 queue = deque([(0,hx-1,hy-1)]) while queue: v = queue.popleft() w, x, y = v[0], v[1]..
2023. 8. 4.