[20250628] BOJ / G4 / 도시 분할 계획 / 이강현 #394
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/1647
🧭 풀이 시간
30분
👀 체감 난이도
✏️ 문제 설명
마을에 N개의 집들이 있고 이들을 잇는 M개의 길들이 있음.
길들은 유지비를 가지고 모든 집들은 연결되어 있음.
이때 마을을 두개의 마을로 쪼개려고 함.
각각의 마을의 집들은 모두 연결되어 있어야 함.
이때 최소 유지비를 출력
🔍 풀이 방법
MST
MST 적용하고 마지막 간선 하나 제거하면 됨.
⏳ 회고
걍 MST 기초