Skip to content

Conversation

@lkhyun
Copy link
Contributor

@lkhyun lkhyun commented Jan 12, 2026

🧷 문제 링크

https://www.acmicpc.net/problem/25690

🧭 풀이 시간

30분

👀 체감 난이도

✏️ 문제 설명

트리의 정점을 색칠할거임.
이웃한 두 정점이 white,white 혹은 white,black이 되게끔 색칠해야하는데 정점마다 white,black 색칠하는 비용이 서로다름
조건을 만족하면서 최소비용으로 트리내 정점을 모두 색칠하는 비용을 출력하자.

🔍 풀이 방법

트리 dp
dfs로 진입하면서 색칠하기

⏳ 회고

트리 dp를 저번에 처음 접해봐서 하나 더 풀어봤는데 감이 잡히는 듯 하다.

@lkhyun lkhyun self-assigned this Jan 12, 2026
@lkhyun lkhyun added the success 👍 해설을 보지 않고 풀었을 때 label Jan 12, 2026
@ShinHeeEul ShinHeeEul merged commit 5f6117f into main Jan 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

success 👍 해설을 보지 않고 풀었을 때

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants