Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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/6497
🧭 풀이 시간
30분
👀 체감 난이도
✏️ 문제 설명
여러 길이 있는 도시가 전력난에 시달려, 길 일부의 불을 꺼서 전력난을 해소하려고 합니다.
이 때 모든 집 끼리는 불이 켜진 길을 통해서 이동할 수 있어야 합니다.
절약할 수 있는 전기비용의 최댓값을 구하는 문제입니다.
🔍 풀이 방법
최소신장트리를 이용해서 풀었습니다.
모든 집 끼리 불이 켜진 길을 통해서 이동하는 방법 = 최소 신장트리를 이용해서 이 비용을 최소화 시켰습니다.
그리고 길의 총 비용에서 위의 비용을 빼서 구했습니다.
⏳ 회고
최소신장트리만 떠올렸으면 쉽게 풀렸을 문제입니다