[백준/BOJ] 백준 15458번 : Barn Painting
www.acmicpc.net/problem/15458 15458번: Barn Painting Farmer John has a large farm with $N$ barns ($1 \le N \le 10^5$), some of which are already painted and some not yet painted. Farmer John wants to paint these remaining barns so that all the barns are painted, but he only has three paint colors available. www.acmicpc.net 루트가 1인 트리를 만들고, 트리 DP(트리에서 다이나믹 프로그래밍)를 이용해 문제를 해결했다. 주의해야 될 점은 there에 her..
2021.03.01