正文
增加 2 行删除 2 行
209 行未改动全部展开2102112122132142152162172182192202217 行未改动209 行未改动全部展开int x = rd(), y = rd(), c = rd();addedge(x, y, c);addedge(y, x, c);}dfs1(1); dfs2(1, 1);build(1, 1, n);while (m--) {int x = rd(), y = rd();sum_e += y;sum_dis_e += (LL)dis[x] * y;7 行未改动209 行未改动全部展开2102112122132142152162172182192202217 行未改动209 行未改动全部展开int x = rd(), y = rd(), c = rd();addedge(x, y, c);addedge(y, x, c);}dfs1(1); dfs2(1, 1);build(1, 1, n);while (m--) {int x = rd(), y = rd();sum_e += y;sum_dis_e += (LL)dis[x] * y;7 行未改动