摘要:
取分块大小 \(n^\frac{2}{3}\) 最优。 例题:数颜色 #include<bits/stdc++.h> using namespace std; using i64 = long long; const int N = 1e6 + 5; int cnt[N], a[N]; struct 阅读全文
摘要:
#include<bits/stdc++.h> using namespace std; using i64 = long long; const int N = 1e6 + 5; int cnt[N], a[N]; struct query { int l, r, id; }; int main( 阅读全文