题意: 解法: 时间复杂度: std: #include <bits/stdc++.h> #define per(i,a,b) for(int i=a;i<=b;++i) using namespace std; const int maxn=100005; int n,m; int a[maxn]; vector<int>v[maxn<<2]; vector<int>::iterator it; void build(int id,int l,int r) { v[id].clear(); per(i,l,r) v[...