[20251211] BOJ / G4 / 알고리즘 수업 - 행렬 경로 문제 4 / 김민진 #1645
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.
🧷 문제 링크
알고리즘 수업 - 행렬 경로 문제 4
🧭 풀이 시간
30분
👀 체감 난이도
✏️ 문제 설명
주어진 좌표를 하나라도 거치며
(N, N)에 도달할 때 얻을 수 있는 가장 높은 점수🔍 풀이 방법
3차원 dp
⏳ 회고
초기화 과정이 조금 헷갈렸음,,
dp[1][1]초기화는 계산을 쉽게 하기 위한 패딩이 아님계산의 일부이기 때문에 계산에서 제외해야 제대로 된 값이 나옴
→ 포함시키는 경우
dp[1][1]이 P에 속하는지 여부 따져서 초기화 한 것이 무용지물이 됨dp 두 번 쓴 사람들이 많네..