摘要:
洛谷【模板】普通平衡树 #include<bits/stdc++.h> using namespace std; #define inf 0x7fffffff int n; int tot,root;//结点总数,根 struct jade { int val,fa,size,cnt;//权值,父亲 阅读全文
摘要:
中国剩余定理 CRT 定义 CRT 问题的解决方法 代码 模板题 P1495 【模板】中国剩余定理(CRT)/ 曹冲养猪 #include<bits/stdc++.h> using namespace std; long long mod[0],yu[20]; long long M=1; long 阅读全文
摘要:
一维树状数组 1. 单点修改,区间查询 #include<bits/stdc++.h> using namespace std; long long n,q; long long a[1000100],c[1000100]; long long lowbit(long long x) { retur 阅读全文