[Baekjoon] 백준 1937 욕심쟁이 판다 Python
·
🔻PS/Baekjoon
https://www.acmicpc.net/problem/1937 import sysinput = sys.stdin.readlinesys.setrecursionlimit(10**6)n = int(input())graph = []visited = [[0 for _ in range(n)] for _ in range(n)]dp = [[-1 for _ in range(n)] for _ in range(n)]for _ in range(n): temp = list(map(int, input().split(" "))) graph.append(temp)dx = [0, 0, 1, -1]dy = [1, -1, 0, 0]max_val = 0cnt = 0def dfs(x, y): if dp[x][y] != -..