Codeforces 739B Alyona and a tree
dep[u] >= dep[v]-a[v],可以用二分在树链上找点u,并维护点u点的前缀和。代码:#includebits/stdc++.h>//#define make_pair MPusing namespace std;typedef __int64 ll;typedef pairll, int> PII;const int MAXN = 2e5+5;vec