CF1324E (tree dp)

Maximum White Subtree

I just learned the tree-shaped dp and wrote this question. It feels okay. In fact, the tree-shaped dp is relatively simple compared to other dp (dp really makes people). The difficulty is that the relationship between the root node and the subtree needs to be maintained It is not difficult to think clearly.

Ideas:

 

Guess you like

Origin www.cnblogs.com/SSummerZzz/p/12707022.html