#include #include #include #define in cin #define out cout using namespace std; /* ifstream in("test.in"); ofstream out("test.out"); */ const int Nmax = 50001; int A[Nmax],V[Nmax]; int B[Nmax]; int N,n,M; void refr(int ind){ int has=V[n*ind]; for(int i=n*ind;i>N>>M; n=sqrt(N); for(int i=0;i<=N+1;i++) A[i]=i/n; V[0]=V[N+1]=-1; B[A[0]]=B[A[N+1]]=-1; for(;M;--M){ int t,x,y,z; in>>t; if(t==1){ in>>x>>y>>z; Update(x,y,z); } if(t==2){ in>>x; Query(x); } /* for(int i=1;i<=N;i++) out<