
树的直径
文章平均质量分 80
ssss圆
这个作者很懒,什么都没留下…
展开
-
POJ 1985 Cow Marathon【树的直径】
POJ 1985 Cow Marathon总时间限制: 2000ms单个测试点时间限制: 1000ms 内存限制: 65536kB描述After hearing about the epidemic of obesity in the USA, Farmer John wants his cows to get more exercise, so he has ...原创 2018-08-04 16:25:14 · 222 阅读 · 0 评论 -
POJ 2631Roads in the North【树的直径】【模板题】
POJ 2631:Roads in the North 总时间限制: 1000ms 内存限制: 65536kB描述Building and maintaining roads among communities in the far North is an expensive business. With this in mind, the roads are bu...原创 2018-08-04 16:43:48 · 473 阅读 · 0 评论 -
8.4 拓扑排序+树的直径
1.拓扑排序1.1定义对一个有向无环图(Directed Acyclic Graph简称DAG)G进行拓扑排序,是将G中所有顶点排成一个线性序列,使得图中任意一对顶点u和v,若边(u,v)∈E(G),则u在线性序列中出现在v之前。通常,这样的线性序列称为满足拓扑次序(Topological Order)的序列,简称拓扑序列。简单的说,由某个集合上的一个偏序得到该集合上的一个全序,这...原创 2018-08-05 09:26:21 · 339 阅读 · 0 评论