[20250204] BOJ / 골드4 / 파이프 옮기기 2 / 설진영 #26
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/17069
🧭 풀이 시간
30분 - 근데 풀이 옛날부터 고민했음
👀 체감 난이도
✏️ 문제 설명
파이프 옮기기, dp를 곁들인..
🔍 풀이 방법
파이프 옮기기 1 은 DFS로 풀었는데, 2는 시간초과가 난다. DFS 했던거 그대로 역순으로 생각하면 DP로 비교적 쉽게 나오는 것 같다. 점화식만 세우면 크게 어렵지 않다.
⏳ 회고
반복문 돌릴때 초기값 덮어쓰지 않도록 유의, 또또 오버플로우 났음.. 그냥 long 써야겠다 앞으로