[BaekJoon] 1012 ์ ๊ธฐ๋ ๋ฐฐ์ถ
ยท
๐ฏ CodingTest/BaekJoon
โถ ๋ฌธ์ : ๋๋ณด๊ธฐ https://www.acmicpc.net/problem/1012 import sys t = int(input()) sys.setrecursionlimit(10**6) def dfs(a, b): if a = m or b = n: return if graph[a][b] == 0: return graph[a][b] = 0 dfs(a - 1, b) dfs(a, b - 1) dfs(a + 1, b) dfs(a, b + 1) for _ in range(t): m, n, k = map(int, input().split()) graph = [[0 for _ in range(n)]for _ in range(m)] for _ in range(k): a, b = ma..