#include using namespace std; #define fRead(x) freopen(x,"r",stdin) #define fWrite(x) freopen (x,"w",stdout) #define LL long long #define ULL unsigned long long #define ff first #define ss second #define pb push_back #define INF 2e12 #define PI acos(-1.0) #define mk make_pair #define pii pair #define pll pair #define min3(a,b,c) min(a,min(b,c)) #define max3(a,b,c) max(a,max(b,c)) #define min4(a,b,c,d) min(a,min(b,min(c,d))) #define max4(a,b,c,d) max(a,max(b,max(c,d))) #define SQR(a) ((a)*(a)) #define FOR(i,a,b) for(int i=a;i<=b;i++) #define ROF(i,a,b) for(int i=a;i>=b;i--) #define REP(i,b) for(int i=0;i> 1; } } #endif bool Check(int N,int pos) { return (bool)(N&(1<0){if(P%2==1){R=(R*B)%M;}P/=2;B=(B*B)%M;}return R;} #ifdef FAC LL fac[200005];void FacGen(){fac[0]=1;FOR(i,1,200000)fac[i]=(fac[i-1]*i)%mod;} LL COM(LL a,LL b){return ((fac[a]*BigMod((fac[b]*fac[a-b])%mod,mod-2,mod))%mod+mod)%mod;} #endif LL n,q; double a,b; LL ara[100005]; int main() { cin >> n >> a >> b >> q; REP(i,n)cin >> ara[i]; while(q--) { int tp; cin >> tp; if(tp==1) { int l,r; cin >> l >> r; ara[l] = r; } else { dequev; int l,r; cin >> l >> r; for(int i = r;i>=l;i--)v.pb(ara[i]); for(int i = 0 ;i