백준 치즈 (2636번)
난이도 골드 IV 풀이 처음에 외부와 접촉한 치즈만 녹여야 하는데 이것을 어떻게 코드로 구현할까 고민을 했다 -> dfs로 값이 0인 부분만 탐색해주면 된다. import sys from collections import deque input=sys.stdin.readline height,width=map(int,input().split()) boards = [list(map(int,input().split()))for _ in range(height)] path = deque() answer = 0 cheeseCnt = 0 cheeseCntArr = [] dx=[-1,1,0,0] dy=[0,0,-1,1] def dfs(xx,yy): visited = [[False for _ in range(width)..
2023. 4. 20.