반응형 171981 [BOJ][Python]17198번 풀이 https://www.acmicpc.net/problem/17198 17198번: Bucket Brigade The input file contains 10 rows each with 10 characters, describing the layout of the farm. There are exactly one barn, one lake, and one rock. www.acmicpc.net from collections import deque def bfs(r,c): q = deque() q.append((r,c)) t[r][c]=0 while q: r,c = q.popleft() for dr,dc in d: R,C = r+dr, c+dc if 0 2022. 5. 25. 이전 1 다음 반응형