Notice
Recent Posts
Recent Comments
Link
목록2251 (1)
나의 개발일지
문제 : https://www.acmicpc.net/problem/2251 🔑 물통의 이동 경우의 수 6가지 C → A C → B B → A B → C A → B A → C one, two, three = map(int, input().split()) answer = [] m = max(one, two, three) chk = [[[0] * (m+1) for _ in range(m+1)] for _ in range(m+1)] def dfs(a, b, c): if chk[a][b][c] == 1: return if a == 0: answer.append(c) chk[a][b][c] = 1 if c > (one - a): # C -> A dfs(one, b, c - (one - a)) else: dfs(a ..
백준
2023. 10. 19. 20:29