[20250223] BOJ / 골드4 / 타일 채우기 3 / 설진영 #169
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🧷 문제 링크
https://www.acmicpc.net/problem/14852
🧭 풀이 시간
60분
👀 체감 난이도
✏️ 문제 설명
2×N 크기의 벽을 2×1, 1×2, 1×1 크기의 타일로 채우는 경우의 수를 구해보자.
🔍 풀이 방법
N이 증가할수록 N=3 일때부터 새로운 경우의수 두가지가 계속 나온다. 따라서 2차원 DP를 활용해 해당 경우를 반영해줘야 한다.

⏳ 회고
처음에 N=3까지인 경우에 대해서만 규칙을 찾아 좋다고 바로 풀었더니 틀림..
시간 초과가 날 수 있으므로 다른 DP 배열을 활용해 누적합을 저장해 주어야 한다.