[백준 7569/파이썬] 토마토
소스코드 import sys from collections import deque m,n,h = map(int,input().split()) graph = [] queue = deque([]) for i in range(h): tmp = [] for j in range(n): tmp.append(list(map(int,sys.stdin.readline().split()))) for k in range(m): if tmp[j][k]==1: queue.append([i,j,k]) graph.append(tmp) dx = [-1,1,0,0,0,0] dy = [0,0,1,-1,0,0] dz = [0,0,0,0,1,-1] while(queue): x,y,z = queue.popleft() for i in rang..