[20251209] BOJ / G5 / 1학년 / 김민진 #1627
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.
🧷 문제 링크
1학년
🧭 풀이 시간
20분
👀 체감 난이도
✏️ 문제 설명
주어진 수열 사이에
+와-를 적절히 넣어서 마지막 숫자를 만들 수 있는 경우 구하기단 연산 과정에서 20을 초과하거나 음수가 되지 않아야 함
🔍 풀이 방법
DP
수 계산하면서 유효한 숫자이면 이전 dp값 저장하기
⏳ 회고
생긴게 백트래킹처럼 생겨서 처음에는 백트래킹으로 풀었는데 굳이 그럴 필요 없는 거 같아서 dp로 다시 풀어봄