A Tricky DP Problem on Trees
http://rachitiitr.blogspot.in/2017/05/a-tricky-dp-problem-on-trees.html
Codeforces Round 946 Solution Discussion