Gardening

1822F Gardening Friends

[题目链接](https://codeforces.com/problemset/problem/1822/F) # 题解 **知识点:树的直径,枚举。** 考虑一个结论:树上任意点的最远点一定是树的直径的端点。 那么对于一个根节点,只要知道了树的直径,那么我们就可以立即得到最远距离,即乘 $k$ ......
Gardening Friends 1822F 1822

F. Gardening Friends

F. Gardening Friends Two friends, Alisa and Yuki, planted a tree with $n$ vertices in their garden. A tree is an undirected graph without cycles, loop ......
Gardening Friends
共2篇  :1/1页 首页上一页1下一页尾页