#include using namespace std; #include using namespace atcoder; const int K=4; struct S{ int length; int d[K][K]={0}; S(int length=0):length(length){} }; void expand(S &x){ for(int l=1;l>n; vector a(n);for(auto &e:a){cin>>e;e--;} vector s(n); for(int i=0;i seg(s); int q;cin>>q; while(q--){ int type;cin>>type; if(type==1){ int l,r;cin>>l>>r;l--; auto res=seg.prod(l,r);expand(res); cout<>l>>r>>x;l--;x--; seg.apply(l,r,x); } } }