1189. [Python] 컴백홈
1. 문제 https://www.acmicpc.net/problem/1189 2. 접근 방법 시간 제한: 2초메모리 제한: 128MBDFS백트래킹 3. 파이썬 코드 import sysinput = sys.stdin.readlineR, C, K = map(int, input().split())# 공백 제거matrix = [list(input().rstrip()) for _ in range(R)]visited = [[False] * C for _ in range(R)]answer = 0dx = [-1, 1, 0, 0]dy = [0, 0, -1, 1]def dfs(x, y, dist): global answer # 목표에 도달 했을때 거리가 K 와 같으면 if x == 0 and y == C ..
2026. 2. 8.