[Python Algorithm] ์ ๊ธฐ๋ ๋ฐฐ์ถ BOJ #1012
๋ฌธ์ https://www.acmicpc.net/problem/1012 1012๋ฒ: ์ ๊ธฐ๋ ๋ฐฐ์ถ ์ฐจ์ธ๋ ์๋์ธ ํ๋๋ ๊ฐ์๋ ๊ณ ๋ญ์ง์์ ์ ๊ธฐ๋ ๋ฐฐ์ถ๋ฅผ ์ฌ๋ฐฐํ๊ธฐ๋ก ํ์๋ค. ๋์ฝ์ ์ฐ์ง ์๊ณ ๋ฐฐ์ถ๋ฅผ ์ฌ๋ฐฐํ๋ ค๋ฉด ๋ฐฐ์ถ๋ฅผ ํด์ถฉ์ผ๋ก๋ถํฐ ๋ณดํธํ๋ ๊ฒ์ด ์ค์ํ๊ธฐ ๋๋ฌธ์, ํ๋๋ ํด์ถฉ ๋ฐฉ์ง์ www.acmicpc.net ๋ด ๋ฌธ์ ํ์ด t = int(input()) dx = [0, 0, -1, 1] dy = [-1, 1, 0, 0] queue = [] for _ in range(t): m, n, k = map(int, input().split()) # ๊ฐ๋ก๊ธธ์ด, ์ธ๋ก๊ธธ์ด, ๋ฐฐ์ถ ๊ฐ์ space = [[0] * m for _ in range(n)] # ๋ฐฐ์ถ๋ฐญ count = 0 for _ in range(k): y, x = ..
2022. 1. 27.