[Python][백준 1261 번] 알고스팟
# https://www.acmicpc.net/problem/1261 import sys import heapq from collections import Counter , deque sys.setrecursionlimit(100000) dx = [-1,1,0,0] dy = [0,0,-1,1] M,N = map(int,input().split()) mirrors = [list(map(int,input())) for _ in range(N)] dist = [[-1] * M for _ in range(N)] q = deque() dist[0][0] = 0 q.append((0,0,0)) ans = int(1e9) while q : x,y,d = q.popleft() if x == N-1 and y == M ..
더보기