hdu 4607 Park Visit
摘要:
// dfs求树的直径// 记录以 节点i为根的最长路径 以及最大深度// 然后就 看 k的值了#include #include #include #include #include #include #include using namespace std;#define maxm 100010#define maxn 1000110struct Eg{ int to; int next;}E[maxmmax1){ max2=max(max1,max2); max1=tp; } else if(tp>max2) ... 阅读全文