摘要: 跟上一题几乎是一模一样的套路。 离线+倍增预处理+开以深度为权值的线段树。 代码如下: #include<bits/stdc++.h> using namespace std; const int maxn=1e5+10; int n,m,f[maxn][20]; int root[maxn],to 阅读全文
posted @ 2020-06-18 09:19 syzf2222 阅读(137) 评论(0) 推荐(0) 编辑