#include<cstdio>
#include<algorithm>
#include<iostream>
#include<cmath>
#define inf 0x3f3f3f3f
#define LL unsigned long long
#define left_child now<<1,l,mid
#define right_child now<<1|1,mid+1,r
using namespace std;
int n,q;
struct node{
int l,r;
long long tot;
bool lazy;
}e[100010*4];
int map[100010*3],map2[100010*3],Hashhash[100010*3];
int k=1;
int a,b,c,m;
int op[100010];
int Left[100010];
int Right[100010];
int f(int u)
{
int now=0;
now = lower_bound(map + 1,map + 1 + m,u) - map;
return now;
}
void build(int now,int l,int r)
{
e[now].l=l,e[now].r=r;
if(l==r)return;
int mid=(l+r)>>1;
build(left_child);
build(right_child);
}
void pushdown(int k)
{