I题,标准的LCA+树上差分边源码 #include <cstdio> #include <cstring> #include <algorithm> #include <vector> #include <iostream> using namespace std; int fa[100001][20]; int deep[100001]; long long diff[100001]; //倍增lca int lca(int x, int y){ int i=0; while(1){ if(x==y...