문제 https://www.acmicpc.net/problem/1987코드# 백트래킹 문제 import sysfrom collections import dequesys.setrecursionlimit(10**9)def Input_Data(): input = sys.stdin.readline R, C = map(int, input().split()) graph = [] for _ in range(R): graph.append(list(input())) return R,C, graphd = ((1,0),(-1,0),(0,1),(0,-1))def Dfs(x,y,cnt): global ans ans = max(cnt, ans) for dx, dy in d..