
ACM树的直径
桑榆207
在最终的结果到来之前,任何肯定会赢之类的话都是虚无缥缈的。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Cow Marathon POJ - 1985 树的直径
题意:给出n,m,然后m条边,求树的直径。思路:两遍dfs。代码:#include<iostream>#include<algorithm>#define rep(i,a,b) for(int i=a;i<=b;i++)#define ll long long#include<string.h>#include<queue...原创 2020-02-02 11:25:15 · 175 阅读 · 0 评论 -
POJ1985 Cow Marathon树的直径
http://poj.org/problem?id=1985DescriptionAfter 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 fo...原创 2019-01-05 16:50:49 · 209 阅读 · 0 评论 -
HDU4612Warm up 缩点加树的直径
http://acm.hdu.edu.cn/showproblem.php?pid=4612 Problem Description N planets are connected by M bidirectional channels that allow instant transportation. It's always possible to travel betw...原创 2019-01-01 22:31:16 · 148 阅读 · 0 评论 -
LIGHTOJ 1094树的直径
http://lightoj.com/login_main.php?url=volume_showproblem.php?problem=1094Given a tree (a connected graph with no cycles), you have to find the farthest nodes in the tree. The edges of the tree are w...原创 2019-01-15 18:58:31 · 315 阅读 · 0 评论