随笔分类 - 树链剖分
摘要:继续存模板。。 倍增版: cpp include using namespace std; typedef long long ll; const int MAXN = 500000+1; int fa[MAXN][21];int deep[MAXN];int n,m,s; inline void
阅读全文
摘要:放个板子而已。。 cpp include include define ls root 1)); tree[rs].val += tree[root].lazy (len 1); tree[ls].val %= p; tree[rs].val %= p; tree[root].lazy = 0; }
阅读全文