#include using namespace std; using Int = long long; template inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template inline void chmax(T1 &a,T2 b){if(a>n>>q; vector as(n); for(int i=0;i>as[i]; for(int i=0;i>t; if(t==1){ int l,r,x; cin>>l>>r>>x; l--; for(int j=l;j>l>>r; l--; int res=0; for(int j=l;j+1