링크: https://www.acmicpc.net/problem/1261✅ 벽을 부순다 = 벽의 비용을 더했을때 최소비용이된다 => 다익스트라import heapqM,N = map(int,input().split())graph = [list(map(int,list(input()))) for _ in range(N)]INF = int(1e9)distance = [[INF]*M for _ in range(N)]dr = [-1,0,1,0]dc = [0,1,0,-1]def dijkstra(start_r,start_c): distance[start_r][start_c]=0 q=[] heapq.heappush(q,(0,(start_r,start_c))) while q: dist,(..