版本比较
题解:「Gensokyo OI Round 1」雨后长虹
正文
增加 2 行删除 2 行
146 行未改动全部展开14714814915015115115215315415563 行未改动21922022122222322322422522622717 行未改动146 行未改动全部展开 while (top[u]!=top[v]){ if (dep[top[u]]<dep[top[v]])swap(u,v); ans=min(ans,getmin(1,ID[top[u]],ID[u])); u=f[top[u]];
} if (dep[u]>dep[v])swap(u,v); ans=min(ans,getmin(1,ID[u],ID[v])); return ans;63 行未改动 int ans=0; for (int i=1;i<=q;i++){ temp[i]=sum(1,ID[A[i]],ID[A[i]]); modify(1,ID[A[i]],1e18,0);
} for (int i=1;i<q;i++){ ans+=pathsum(A[i],A[i+1],0); }17 行未改动