161C

Atcoder ARC161C Dyed by Majority (Odd Tree)

首先能发现对于树的叶子节点,与其连边的只有其父节点,所以该节点最终状态为 $\text{B/W}$ 其父节点的状态就一定为 $\text{B/W}$。 然后考虑它自己是什么状态,因为同样的与其连边的只有其父节点,所以其父节点最终状态为 $\text{B/W}$ 其状态就为 $\text{B/W}$。 ......
Majority Atcoder 161C Dyed Tree
共1篇  :1/1页 首页上一页1下一页尾页