백준 / 7569번 / 토마토 / python 파이썬
·
Coding Test/Baekjoon
문제 : https://www.acmicpc.net/problem/7569 나의 풀이import sysfrom collections import dequeinput = sys.stdin.readlineM, N, H = map(int, input().split())boxes = [[list(map(int, input().split())) for _ in range(N)] for _ in range(H)]def bfs(): q = deque() # 처음부터 익은 토마토 큐에 추가 for tomato in tomatoes: q.append(tomato) dz = [1, -1, 0, 0, 0, 0] dy = [0, 0, 1, -1, 0, 0] dx = [0, 0,..