摘要:
思路:树状数组统计。待验证,不知道是否对。#include#include#include#include#include#define lowbit(x) (x&(-x))#define Maxn 200010using namespace std;int C[Maxn],vi[Maxn],pre[Maxn],n,num[Maxn],ans[Maxn],ov[Maxn];struct Qu{ int l,r,i;}q[Maxn];int cmp(Qu a,Qu b){ return a.r<b.r;}void update(int pos,int val){ while(p.. 阅读全文