线段树.. --------------------------------------------------------------------------------- #include<cstdio> #include<algorithm> #include<cstring> #include<iostream> #define rep( i , n ) for( int i = 0 ; i < n ; ++i ) #define clr(…
在线段树上记录长度.区间01翻转标记.当前1个数.传递tag的时候用长度-1个数即可 #include<iostream> #include<cstdio> using namespace std; const int N=100005; int n,m; struct qwe { int l,r,len,v,tg; }t[N<<2]; int read() { int r=0,f=1; char p=getchar(); while(p>'9'||p<'0…