[백준] 4179번 - 불! (파이썬)
# 불! from collections import deque import sys input = sys.stdin.readline dx = [0, 1, 0, -1] dy = [1, 0, -1, 0] N, M = map(int, input().split()) arr = [] now = deque() fire = deque() for i in range(N): arr.append(list(input().strip())) for j in range(M): if arr[i][j] == 'J': now.append((i, j)) arr[i][j] = 1 if arr[i][j] == 'F': fire.append((i, j)) def move(): leng = len(now) for _ in range(leng):..
2022. 3. 3.