Bear and Tree Jumps CodeForces - 771C (树形dp)

大意: 给定树,每步能走到距离不超过$k$的任意点,记$f(s,t)$为$s$到$t$的最少步数,求$\sum\limits_{s<t}f(s,t)$

猜你喜欢

转载自www.cnblogs.com/uid001/p/11273086.html