[백준 1987번] 알파벳 문제 풀이 (with Python)
- 틀렸습니다. from collections import deque R, C = map(int,input().split()) arr =[] for i in range(R): arr.append(list(input())) passed = [] # 지나간 알파벳 목록 저장 dx = [0, 0, -1, 1] dy = [1, -1, 0, 0] q = deque() def dfs(x,y, cnt): global result result = max(result, cnt) print(passed) q.append((x, y)) while(q): x, y = q.popleft() for i in range(4): nx = x + dx[i] ny = y + dy[i] if 0..
2023. 11. 8.