1833G

CF1833G Ksyusha and Chinchilla 题解

题意: 思路: 当 $ n \not \equiv 0 \space (mod \space 3) $ 时,无解; 当 $ n \equiv 0 \space (mod \space 3) $ 时,设 $ size_u $ 表示以 $ u $ 为根的子树还剩余的节点个数,自根节点向叶子节点递归,返回 ......
题解 Chinchilla Ksyusha 1833G 1833

CF1833G Ksyusha and Chinchilla

[题目链接](https://codeforces.com/problemset/problem/1833/G) # 题解 **知识点:贪心,树形dp。** 当 $3 \not \mid n$ 时,显然无解。 考虑一种贪心策略,从叶子节点往上只,要以当前节点为根的子树大小能被 $3$ 整除,就立刻切 ......
Chinchilla Ksyusha 1833G 1833 and
共2篇  :1/1页 首页上一页1下一页尾页