摘要:
题目描述 如题,主席树求区间内不同数字的个数 \(Code\) #include<cstdio> #include<cstring> using namespace std; const int N = 1e6 + 5; int n , m , a[N] , la[N] , rt[N] , size 阅读全文
摘要:
显然,下面的代码是求 \([l..r]\) 中不同颜色的种数 其中 \(block = \frac{n}{\sqrt{\frac 2 3 m}}\) 且奇数块中按 \(a.r > b.r\) 排(首块为偶数块) \(Code\) #include<cstdio> #include<cmath> #i 阅读全文