#include using namespace std; #include using namespace atcoder; using ll = long long; using ld = long double; #define fi first #define se second #define pb push_back vector operation; random_device seed; mt19937 randint(seed()); int grr(int mi, int ma) { // [mi, ma) return mi + randint() % (ma - mi); } void op(ll x){ if(x==0){ return; } if(x>0){ if(x%2==0){ operation.pb(3); op(x/2); } else{ operation.pb(1); op(x-1); } return; } if(x<0){ if(x%2==0){ operation.pb(3); op(x/2); } else{ operation.pb(2); op(x+1); } } } int main(){ int n,q; cin>>n>>q; ll first[n]={}; ll second[n]={}; for(int i=0;i>c; if(c==1){ int s; cin>>s; if(s==1){ first[0]+=1,first[1]+=3,first[2]+=2; } if(s==2){ first[1]+=1,first[2]+=2; } if(s>=3){ if(s>s; if(s==1){ first[0]+=1; if(1=2){ ll z=s; z*=z; first[0]+=s*s; first[1]-=2*s-1; first[2]+=2; if(s+1