๐ฅ Silver2 https://www.acmicpc.net/problem/17086 โ
์ ๋ตํ์ดimport sysfrom collections import dequeinput = sys.stdin.readlinem, n = map(int, input().rstrip().split())dx = [0, 1, 1, 1, 0, -1, -1, -1]dy = [-1, -1, 0, 1, 1, 1, 0, -1]def bfs(): result = 0 while queue: cy, cx = queue.popleft() for i in range(8): ny, nx = dy[i] + cy, dx[i] + cx # ์์ด๊ฐ ์๋ 0์ ๋ํด ์ด๋ ..