正文
增加 4 行删除 4 行
899 行未改动全部展开900901902903904905906907908222 行未改动全部展开113111321133113411351136113711381139114080 行未改动12211222122312241225122612271228122920 行未改动899 行未改动全部展开int main() {cout<<"你以为这题就讲完了,都还没证明为什么这样做是对的呢"return 0;}```如果一条边被用了两次,那么我们先选直径就不一定是最优的了。222 行未改动全部展开}int app[MAXN],tot,b[MAXN*2],dapp[MAXN],fath[MAXN];LL dis[MAXN];void dfs(int node,int fa,LL dist) {b[++tot]=node;//dfs序上点对应的编号app[node]=tot;//第一个出现的位置dis[node]=dist;fath[node]=fa;for(int i=h[node];i;i=que[i].f) {int t=que[i].t;80 行未改动update(1,1,tot,x,y,z);printf("%lld\n",last=tree[1].lmr);}return 0;}```# PART(3):总结20 行未改动899 行未改动全部展开900901902903904905906907908222 行未改动全部展开113111321133113411351136113711381139114080 行未改动12211222122312241225122612271228122920 行未改动899 行未改动全部展开int main() {cout<<"你以为这题就讲完了,都还没证明为什么这样做是对的呢"return 0;}```如果一条边被用了两次,那么我们先选直径就不一定是最优的了。222 行未改动全部展开}int app[MAXN],tot,b[MAXN*2],dapp[MAXN],fath[MAXN];LL dis[MAXN];void dfs(int node,int fa,LL dist) {b[++tot]=node;//dfs序上点对应的编号app[node]=tot;//第一个出现的位置dis[node]=dist;fath[node]=fa;for(int i=h[node];i;i=que[i].f) {int t=que[i].t;80 行未改动update(1,1,tot,x,y,z);printf("%lld\n",last=tree[1].lmr);}return 0;}```# PART(3):总结20 行未改动