파이썬 시간초과문제
import sys
from collections import deque
n, m = map(int, sys.stdin.readline().split())
grid = [list(sys.stdin.readline().strip()) for _ in range(n)]
ds = [(1, 0), (-1, 0), (0, 1), (0, -1)]
ghost_pos_list = []
for i in range(n):
for j in range(m):
if grid[i][j] == 'D':
dest_pos = [i, j]
elif grid[i][j] == 'G':
ghost_pos_list.append([i, j])
elif grid[i][j] == 'N':
start_pos = [i, j]
def calc_na...
- 연습문제 톡
- 날짜
- 2024-04-03 23:09:14
- 작성자
- wowns123456
- 댓글
- 0