[백준 1525번] 퍼즐
from copy import deepcopy from collections import deque import sys sys.setrecursionlimit(10**7) graph = [list(map(int,input().split())) for _ in range(3)] final_graph = [[1,2,3],[4,5,6],[7,8,0]] dx = [-1,1,0,0] dy = [0,0,-1,1] visited = {} temp_graph = deepcopy(graph) for i in range(3): for j in range(3): if graph[i][j] == 0: first_x, first_y = i, j def changeToString(arr): # 퍼즐의 상태를 문자열로 바꿔주는 함..
2023. 8. 12.