樹形dp求樹直徑、兩次dfs求樹直徑

樹形dp求樹直徑: #include<bits/stdc++.h> #include<ctime> #define ll long long using namespace std; const int N=100010,M=1000010; int head[N]; int ver[M]; int edge[M]; int Next[M]; bool v[N]; int tot; void ad
相關文章
相關標籤/搜索