[20250830] BOJ / P5 / 도로포장 / 한종욱 #775
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/1162
🧭 풀이 시간
30분
👀 체감 난이도
✏️ 문제 설명
다익스트란데 K개 이하의 도로를 포장할 거다. 그 때, 얻을 수 있는 최소 시간을 구하라.
🔍 풀이 방법
dist[][]인데 dp적인 성격이 강했다고 생각한다.
다음 길을 선택할 때,
를 구분해야 했다.
⏳ 회고
최근에 배낭문제를 많이 풀어서, 풀이가 운이 좋게 생각났다. 실제로 1학기 동안 도로포장을 풀려고 시도를 몇번이나 했지만 실패했었다.