![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
树的直径
心脏dance
求关注!!!求关注!!!安卓、后端学习记录,面试算法题(博主ACM区域赛银牌~~~水银嘻嘻~~~,蓝桥杯国一~~~),面试技术题。如果觉得博主写的好,菜鸡博主求关注~~~。 /*
呜呜呜~~大学的时候,写的博文中有些是借鉴的,若有侵权,请告知,立马删除。。。。 */
展开
-
POJ——2631 Roads in the North(树的直径)
Building and maintaining roads among communities in the far North is an expensive business. With this in mind, the roads are build such that there is only one route from a village to a village that do...原创 2018-08-23 16:24:13 · 135 阅读 · 0 评论 -
小A与欧拉路 (树加边求最小权值欧拉路+树的直径)
链接:https://ac.nowcoder.com/acm/contest/369/C来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 131072K,其他语言262144K64bit IO Format: %lld题目描述小A给你了一棵树,对于这棵树上的每一条边,你都可以将它复制任意(可以为0)次(即在这条边连接的两个点之间再加一条边权相同的边),...原创 2019-02-16 10:16:33 · 372 阅读 · 0 评论