摘要:
求树的直径。 两遍$dfs$就好了。 cpp include include include include include const int maxn = 10000; const int maxm = 10000; using namespace std; int to[(maxn + max 阅读全文
摘要:
有点忧愁。$CSP$也考$Tarjan$缩点的嘛。 原理咱也不明白,咱也不敢学,找到模板就是抄。 cpp include const int maxn = 10000; const int maxm = 100000; using namespace std; int to[maxm + 10]; 阅读全文