#include<cstdio> #include<ctime> #include<cstdlib> #include<iostream> #define M 3000009 using namespace std; struct shu { int l,r,sum1,zhi,dui,sum2; }a[M]; int n,root[M],size,ans,b[M],m; void you(int &a1) { int t=a[a1].l; a[a1]…
#include<cstdio> #include<cmath> #include<algorithm> using namespace std; #define N 50001 #define SQRT 227 int n,m,xs[N],ys[N],ks[N],op[N],en,ma[100001],en2,a[100001]; int num[N],l[SQRT],r[SQRT],sumv[SQRT],sum=1;//分块 int num2[100001],l2[…
Code: #include <cstdio> #include <algorithm> #include <string> #include <cstring> using namespace std; #define maxn 50005*256 #define ll long long int n,m,tree; struct SEGIN { int cnt; long long sumv[maxn],lazy[maxn]; int lson[maxn…