#include using namespace std; using LL=long long; using ULL=unsigned long long; #define rep(i,n) for(int i=0; i<(n); i++) struct QueryA{ int c,s; }; struct Query{ int c,i,j; }; int N,Q; LL B[100000]; int ddA[100002]; vector A; vector ans; LL topA=0, topdA=0, topddA=0; LL Alast[3]; void query_1(int i){ ans.push_back({1,i+1,0}); B[i]++; } void query_2(int i){ ans.push_back({2,i+1,0}); B[i]--; } void query_3(int i,int j){ ans.push_back({3,i+1,j+1}); B[i]+=B[j]; } void query_4(int i,int j){ ans.push_back({4,i+1,j+1}); B[i]-=B[j]; } void make_k(int i,LL k){ if(k>0){ make_k(i,k/2); query_3(i,i); if(k&1) query_1(i); } if(k<0){ make_k(i,-((-k)/2)); query_3(i,i); if(k&1) query_2(i); } } LL add_si(LL s,LL i){ s=abs(s-i)+1; return s*s; } LL simuA[1000]; void query_A1(int s){ for(int i=s; i=0; i--){ if(i=3) printf("%d %d %d\n",q.c,q.i,q.j); } return 0; }