
树的直径
邵光亮
要为自己喜欢的事情不留余力
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
POJ 2631 Roads in the North(树的直径)
DescriptionBuilding 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 v...原创 2019-08-27 16:52:29 · 606 阅读 · 0 评论 -
Comet OJ - Contest #9 & X Round 3 核心城市(树的直径)
题目描述X 国有nn座城市,n − 1n−1条长度为11的道路,每条道路连接两座城市,且任意两座城市都能通过若干条道路相互到达,显然,城市和道路形成了一棵树。X 国国王决定将kk座城市钦定为 X 国的核心城市,这kk座城市需满足以下两个条件:这kk座城市可以通过道路,在不经过其他城市的情况下两两相互到达。 定义某个非核心城市与这kk座核心城市的距离为,这座...原创 2019-08-27 09:07:23 · 816 阅读 · 0 评论 -
POJ 1985 Cow Marathon (树的直径)
DescriptionAfter hearing about the epidemic of obesity in the USA, Farmer John wants his cows to get more exercise, so he has committed to create a bovine marathon for his cows to run. The marathon...原创 2019-09-29 18:01:58 · 174 阅读 · 0 评论 -
HDU 3534 Tree(树的直径)
Problem DescriptionIn the Data structure class of HEU, the teacher asks one problem: How to find the longest path of one tree and the number of such longest path?InputThere are several test cas...原创 2019-09-29 18:17:07 · 301 阅读 · 0 评论