#include <cstdio>
#include <cstring>
#include <iostream>
#include <queue>
#include <cmath>
#include <map>
#include <stack>
#include <set>
#include <sstream>
#include <vector>
#include <stdlib.h>
#include <algorithm>
using namespace std;

#define dbg(x) cout<<#x<<" = "<< (x)<< endl
#define dbg2(x1,x2) cout<<#x1<<" = "<<x1<<" "<<#x2<<" = "<<x2<<endl
#define dbg3(x1,x2,x3) cout<<#x1<<" = "<<x1<<" "<<#x2<<" = "<<x2<<" "<<#x3<<" = "<<x3<<endl
#define max3(a,b,c) max(a,max(b,c))
#define min3(a,b,c) min(a,min(b,c))

typedef pair<int,int> pll;
typedef long long ll;
const int _inf = 0xc0c0c0c0;
const ll INF = 0x3f3f3f3f3f3f3f3f;
const ll _INF = 0xc0c0c0c0c0c0c0c0;
const ll mod =  (int)1e9+7;
const ll inf = 1e17;
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll ksm(ll a,ll b,ll mod){int ans=1;while(b){if(b&1) ans=(ans*a)%mod;a=(a*a)%mod;b>>=1;}return ans;}
ll inv2(ll a,ll mod){return ksm(a,mod-2,mod);}
const int MAX_N = 200025;
long long s[MAX_N<<2],k[MAX_N],ks[MAX_N],arr[MAX_N],col[MAX_N<<2];
void up(int rt)
{
    s[rt] = s[rt<<1] + s[rt<<1|1];
}
void build(int rt,int l,int r)
{
    col[rt] = inf;
    if(l==r)
    {
        s[rt] = arr[l] - k [l-1];
        return ;
    }
    int mid = (l+r)>>1;
    build(rt<<1,l,mid);
    build(rt<<1|1,mid+1,r);
    up(rt);
}
void down(int rt,int l,int r)
{
    if(col[rt]!=inf)
    {
        int mid = (l+r)>>1;
        col[rt<<1] = col[rt];
        col[rt<<1|1] = col[rt];
        s[rt<<1] = col[rt]*(mid-l+1);
        s[rt<<1|1] = col[rt]*(r-mid) ;
        col[rt] = inf;
    }
}
void update(int rt,int l,int r,int x,int y,int v)
{
    if(x<=l&&r<=y)
    {
        col[rt] = v;
        s[rt] = col[rt]*(r-l+1);
        return ;
    }
    int mid = (l+r)>>1;
    down(rt,l,r);
    if(x<=mid) update(rt<<1,l,mid,x,y,v);
    if(mid<y) update(rt<<1|1,mid+1,r,x,y,v);
    up(rt);
}
long long query(int rt,int l,int r,int x,int y)
{
    if(x<=l&&r<=y)
    {
        return s[rt];
    }
    int mid = (l+r)>>1;
    long long res = 0;
    down(rt,l,r);
    if(x<=mid) res+=query(rt<<1,l,mid,x,y);
    if(mid<y) res+=query(rt<<1|1,mid+1,r,x,y);
    return res;
}
int main()
{
    //ios::sync_with_stdio(false);
    //freopen("a.txt","r",stdin);
    //freopen("b.txt","w",stdout);
    int n,m,x,y;
    char str[5];
    scanf("%d",&n);
    for(int i = 1;i<=n;++i) scanf("%lld",&arr[i]);
    for(int i = 1;i<n;++i)  scanf("%lld",&k[i]);
    for(int i = 2;i<n;++i) k[i]+=k[i-1];
    for(int i = 1;i<n;++i) ks[i] = ks[i-1] + k[i];
    build(1,1,n);
    scanf("%d",&m);
    while(m--)
    {
        scanf("%s%d%d",str,&x,&y);
        if(str[0]=='s')
        {
            printf("%lld\n",query(1,1,n,x,y)+ks[y-1]-(x>=2?ks[x-2]:0));
        }
        else
        {
            int l = 1,r = n,mid,ans_ = 1;
            long long sum = query(1,1,n,x,x) + y;
            while(l<=r)
            {
                mid = (l+r)>>1;
                if(sum>query(1,1,n,mid,mid))
                {
                    ans_ = mid;
                    l = mid + 1;
                }
                else r = mid - 1;
            }
            update(1,1,n,x,ans_,sum);
        }
    }
    //fclose(stdin);
    //fclose(stdout);
    //cout << "time: " << (long long)clock() * 1000 / CLOCKS_PER_SEC << " ms" << endl;
    return 0;
}


#include <cstdio>
#include <cstring>
#include <iostream>
#include <queue>
#include <cmath>
#include <map>
#include <stack>
#include <set>
#include <sstream>
#include <vector>
#include <stdlib.h>
#include <algorithm>
using namespace std;

#define dbg(x) cout<<#x<<" = "<< (x)<< endl
#define dbg2(x1,x2) cout<<#x1<<" = "<<x1<<" "<<#x2<<" = "<<x2<<endl
#define dbg3(x1,x2,x3) cout<<#x1<<" = "<<x1<<" "<<#x2<<" = "<<x2<<" "<<#x3<<" = "<<x3<<endl
#define max3(a,b,c) max(a,max(b,c))
#define min3(a,b,c) min(a,min(b,c))

typedef pair<int,int> pll;
typedef long long ll;
const int _inf = 0xc0c0c0c0;
const ll INF = 0x3f3f3f3f3f3f3f3f;
const ll _INF = 0xc0c0c0c0c0c0c0c0;
const ll mod =  (int)1e9+7;
const ll inf = 1e17;
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll ksm(ll a,ll b,ll mod){int ans=1;while(b){if(b&1) ans=(ans*a)%mod;a=(a*a)%mod;b>>=1;}return ans;}
ll inv2(ll a,ll mod){return ksm(a,mod-2,mod);}
const int MAX_N = 200025;
long long s[MAX_N<<2],k[MAX_N],ks[MAX_N],arr[MAX_N],col[MAX_N<<2];
void up(int rt)
{
    s[rt] = s[rt<<1] + s[rt<<1|1];
}
void build(int rt,int l,int r)
{
    col[rt] = inf;
    if(l==r)
    {
        s[rt] = arr[l] - k [l-1];
        return ;
    }
    int mid = (l+r)>>1;
    build(rt<<1,l,mid);
    build(rt<<1|1,mid+1,r);
    up(rt);
}
void down(int rt,int l,int r)
{
    if(col[rt]!=inf)
    {
        int mid = (l+r)>>1;
        col[rt<<1] = col[rt];
        col[rt<<1|1] = col[rt];
        s[rt<<1] = col[rt]*(mid-l+1);
        s[rt<<1|1] = col[rt]*(r-mid) ;
        col[rt] = inf;
    }
}
void update(int rt,int l,int r,int x,int y,int v)
{
    if(x<=l&&r<=y)
    {
        col[rt] = v;
        s[rt] = col[rt]*(r-l+1);
        return ;
    }
    int mid = (l+r)>>1;
    down(rt,l,r);
    if(x<=mid) update(rt<<1,l,mid,x,y,v);
    if(mid<y) update(rt<<1|1,mid+1,r,x,y,v);
    up(rt);
}
long long query(int rt,int l,int r,int x,int y)
{
    if(x<=l&&r<=y)
    {
        return s[rt];
    }
    int mid = (l+r)>>1;
    long long res = 0;
    down(rt,l,r);
    if(x<=mid) res+=query(rt<<1,l,mid,x,y);
    if(mid<y) res+=query(rt<<1|1,mid+1,r,x,y);
    return res;
}
int main()
{
    //ios::sync_with_stdio(false);
    //freopen("a.txt","r",stdin);
    //freopen("b.txt","w",stdout);
    int n,m,x,y;
    char str[5];
    scanf("%d",&n);
    for(int i = 1;i<=n;++i) scanf("%lld",&arr[i]);
    for(int i = 1;i<n;++i)  scanf("%lld",&k[i]);
    for(int i = 2;i<n;++i) k[i]+=k[i-1];
    for(int i = 1;i<n;++i) ks[i] = ks[i-1] + k[i];
    build(1,1,n);
    scanf("%d",&m);
    while(m--)
    {
        scanf("%s%d%d",str,&x,&y);
        if(str[0]=='s')
        {
            printf("%lld\n",query(1,1,n,x,y)+ks[y-1]-(x>=2?ks[x-2]:0));
        }
        else
        {
            int l = 1,r = n,mid,ans_ = 1;
            int sum = query(1,1,n,x,x) + y;
            while(l<=r)
            {
                mid = (l+r)>>1;
                if(sum>query(1,1,n,mid,mid))
                {
                    ans_ = mid;
                    l = mid + 1;
                }
                else r = mid - 1;
            }
            update(1,1,n,x,ans_,sum);
        }
    }
    //fclose(stdin);
    //fclose(stdout);
    //cout << "time: " << (long long)clock() * 1000 / CLOCKS_PER_SEC << " ms" << endl;
    return 0;
}


#include <cstdio>
#include <cstring>
#include <iostream>
#include <queue>
#include <cmath>
#include <map>
#include <stack>
#include <set>
#include <sstream>
#include <vector>
#include <stdlib.h>
#include <algorithm>
using namespace std;

#define dbg(x) cout<<#x<<" = "<< (x)<< endl
#define dbg2(x1,x2) cout<<#x1<<" = "<<x1<<" "<<#x2<<" = "<<x2<<endl
#define dbg3(x1,x2,x3) cout<<#x1<<" = "<<x1<<" "<<#x2<<" = "<<x2<<" "<<#x3<<" = "<<x3<<endl
#define max3(a,b,c) max(a,max(b,c))
#define min3(a,b,c) min(a,min(b,c))

typedef pair<int,int> pll;
typedef long long ll;
const int inf = 0x3f3f3f3f;
const int _inf = 0xc0c0c0c0;
const ll INF = 0x3f3f3f3f3f3f3f3f;
const ll _INF = 0xc0c0c0c0c0c0c0c0;
const ll mod =  (int)1e9+7;

ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll ksm(ll a,ll b,ll mod){int ans=1;while(b){if(b&1) ans=(ans*a)%mod;a=(a*a)%mod;b>>=1;}return ans;}
ll inv2(ll a,ll mod){return ksm(a,mod-2,mod);}
const int MAX_N = 100025;
int col[MAX_N<<2],k[MAX_N],ks[MAX_N],arr[MAX_N];
long long s[MAX_N<<2];
void up(int rt)
{
    s[rt] = s[rt<<1] + s[rt<<1|1];
}
void build(int rt,int l,int r)
{
    if(l==r)
    {
        s[rt] = arr[l] - k [l-1];
        return ;
    }
    int mid = (l+r)>>1;
    build(rt<<1,l,mid);
    build(rt<<1|1,mid+1,r);
    up(rt);
}
void down(int rt,int l,int r)
{
    if(col[rt])
    {
        int mid = (l+r)>>1;
        col[rt<<1] = col[rt];
        col[rt<<1|1] = col[rt];
        s[rt<<1] = (mid-l+1)*col[rt];
        s[rt<<1|1] = (r-mid) *col[rt];
        col[rt] = 0;
    }
}
void update(int rt,int l,int r,int x,int y,int v)
{
    if(x<=l&&r<=y)
    {
        col[rt] = v;
        s[rt] = col[rt]*(r-l+1);
        return ;
    }
    int mid = (l+r)>>1;
    down(rt,l,r);
    if(x<=mid) update(rt<<1,l,mid,x,y,v);
    if(mid<y) update(rt<<1|1,mid+1,r,x,y,v);
    up(rt);
}
long long query(int rt,int l,int r,int x,int y)
{
    if(x<=l&&r<=y)
    {
        return s[rt];
    }
    int mid = (l+r)>>1,res = 0;
    down(rt,l,r);
    if(x<=mid) res+=query(rt<<1,l,mid,x,y);
    if(mid<y) res+=query(rt<<1|1,mid+1,r,x,y);
    return res;
}
int main()
{
    //ios::sync_with_stdio(false);
    //freopen("a.txt","r",stdin);
    //freopen("b.txt","w",stdout);
    int n,m,x,y;
    char str[5];
    scanf("%d",&n);
    for(int i = 1;i<=n;++i) scanf("%d",&arr[i]);
    for(int i = 1;i<n;++i)  scanf("%d",&k[i]);
    for(int i = 2;i<n;++i) k[i]+=k[i-1];
    for(int i = 1;i<n;++i) ks[i] = ks[i-1] + k[i];
    build(1,1,n);
    scanf("%d",&m);
    while(m--)
    {
        scanf("%s%d%d",str,&x,&y);
        if(str[0]=='s')
        {
            printf("%lld\n",query(1,1,n,x,y)+ks[y-1]-(x>=2?ks[x-2]:0));
        }
        else
        {
            int l = 1,r = n,mid;
            int sum = query(1,1,n,x,x) + y;
            while(l<=r)
            {
                mid = (l+r)>>1;
                if(sum>query(1,1,n,mid,mid))
                {
                    l = mid + 1;
                }
                else r = mid - 1;
            }
            update(1,1,n,x,l,sum);
        }
    }
    //fclose(stdin);
    //fclose(stdout);
    //cout << "time: " << (long long)clock() * 1000 / CLOCKS_PER_SEC << " ms" << endl;
    return 0;
}


#include <cstdio>
#include <cstring>
#include <iostream>
#include <queue>
#include <cmath>
#include <map>
#include <stack>
#include <set>
#include <sstream>
#include <vector>
#include <stdlib.h>
#include <algorithm>
using namespace std;

#define dbg(x) cout<<#x<<" = "<< (x)<< endl
#define dbg2(x1,x2) cout<<#x1<<" = "<<x1<<" "<<#x2<<" = "<<x2<<endl
#define dbg3(x1,x2,x3) cout<<#x1<<" = "<<x1<<" "<<#x2<<" = "<<x2<<" "<<#x3<<" = "<<x3<<endl
#define max3(a,b,c) max(a,max(b,c))
#define min3(a,b,c) min(a,min(b,c))

typedef pair<int,int> pll;
typedef long long ll;
const int inf = 0x3f3f3f3f;
const int _inf = 0xc0c0c0c0;
const ll INF = 0x3f3f3f3f3f3f3f3f;
const ll _INF = 0xc0c0c0c0c0c0c0c0;
const ll mod =  (int)1e9+7;

ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll ksm(ll a,ll b,ll mod){int ans=1;while(b){if(b&1) ans=(ans*a)%mod;a=(a*a)%mod;b>>=1;}return ans;}
ll inv2(ll a,ll mod){return ksm(a,mod-2,mod);}
const int MAX_N = 200025;
long long s[MAX_N<<2],k[MAX_N],ks[MAX_N],arr[MAX_N],col[MAX_N<<2];
void up(int rt)
{
    s[rt] = s[rt<<1] + s[rt<<1|1];
}
void build(int rt,int l,int r)
{
    if(l==r)
    {
        s[rt] = arr[l] - k [l-1];
        return ;
    }
    int mid = (l+r)>>1;
    build(rt<<1,l,mid);
    build(rt<<1|1,mid+1,r);
    up(rt);
}
void down(int rt,int l,int r)
{
    if(col[rt])
    {
        int mid = (l+r)>>1;
        col[rt<<1] = col[rt];
        col[rt<<1|1] = col[rt];
        s[rt<<1] = col[rt]*(mid-l+1);
        s[rt<<1|1] = col[rt]*(r-mid) ;
        col[rt] = 0;
    }
}
void update(int rt,int l,int r,int x,int y,int v)
{
    if(x<=l&&r<=y)
    {
        col[rt] = v;
        s[rt] = col[rt]*(r-l+1);
        return ;
    }
    int mid = (l+r)>>1;
    down(rt,l,r);
    if(x<=mid) update(rt<<1,l,mid,x,y,v);
    if(mid<y) update(rt<<1|1,mid+1,r,x,y,v);
    up(rt);
}
long long query(int rt,int l,int r,int x,int y)
{
    if(x<=l&&r<=y)
    {
        return s[rt];
    }
    int mid = (l+r)>>1;
    long long res = 0;
    down(rt,l,r);
    if(x<=mid) res+=query(rt<<1,l,mid,x,y);
    if(mid<y) res+=query(rt<<1|1,mid+1,r,x,y);
    return res;
}
int main()
{
    //ios::sync_with_stdio(false);
    //freopen("a.txt","r",stdin);
    //freopen("b.txt","w",stdout);
    int n,m,x,y;
    char str[5];
    scanf("%d",&n);
    for(int i = 1;i<=n;++i) scanf("%lld",&arr[i]);
    for(int i = 1;i<n;++i)  scanf("%lld",&k[i]);
    for(int i = 2;i<n;++i) k[i]+=k[i-1];
    for(int i = 1;i<n;++i) ks[i] = ks[i-1] + k[i];
    build(1,1,n);
    scanf("%d",&m);
    while(m--)
    {
        scanf("%s%d%d",str,&x,&y);
        if(str[0]=='s')
        {
            printf("%lld\n",query(1,1,n,x,y)+ks[y-1]-(x>=2?ks[x-2]:0));
        }
        else
        {
            int l = 1,r = n,mid,ans_ = 1;
            int sum = query(1,1,n,x,x) + y;
            while(l<=r)
            {
                mid = (l+r)>>1;
                if(sum>query(1,1,n,mid,mid))
                {
                    ans_ = mid;
                    l = mid + 1;
                }
                else r = mid - 1;
            }
            update(1,1,n,x,ans_,sum);
        }
    }
    //fclose(stdin);
    //fclose(stdout);
    //cout << "time: " << (long long)clock() * 1000 / CLOCKS_PER_SEC << " ms" << endl;
    return 0;
}


#include <cstdio>
#include <cstring>
#include <iostream>
#include <queue>
#include <cmath>
#include <map>
#include <stack>
#include <set>
#include <sstream>
#include <vector>
#include <stdlib.h>
#include <algorithm>
using namespace std;

#define dbg(x) cout<<#x<<" = "<< (x)<< endl
#define dbg2(x1,x2) cout<<#x1<<" = "<<x1<<" "<<#x2<<" = "<<x2<<endl
#define dbg3(x1,x2,x3) cout<<#x1<<" = "<<x1<<" "<<#x2<<" = "<<x2<<" "<<#x3<<" = "<<x3<<endl
#define max3(a,b,c) max(a,max(b,c))
#define min3(a,b,c) min(a,min(b,c))

typedef pair<int,int> pll;
typedef long long ll;
const int _inf = 0xc0c0c0c0;
const ll INF = 0x3f3f3f3f3f3f3f3f;
const ll _INF = 0xc0c0c0c0c0c0c0c0;
const ll mod =  (int)1e9+7;
const ll inf = 1e17;
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll ksm(ll a,ll b,ll mod){int ans=1;while(b){if(b&1) ans=(ans*a)%mod;a=(a*a)%mod;b>>=1;}return ans;}
ll inv2(ll a,ll mod){return ksm(a,mod-2,mod);}
const int MAX_N = 200025;
long long s[MAX_N<<2],k[MAX_N],ks[MAX_N],arr[MAX_N],col[MAX_N<<2];
void up(int rt)
{
    s[rt] = s[rt<<1] + s[rt<<1|1];
}
void build(int rt,int l,int r)
{
    if(l==r)
    {
        s[rt] = arr[l] - k [l-1];
        return ;
    }
    int mid = (l+r)>>1;
    build(rt<<1,l,mid);
    build(rt<<1|1,mid+1,r);
    up(rt);
}
void down(int rt,int l,int r)
{
    if(col[rt])
    {
        int mid = (l+r)>>1;
        col[rt<<1] = col[rt];
        col[rt<<1|1] = col[rt];
        s[rt<<1] = col[rt]*(mid-l+1);
        s[rt<<1|1] = col[rt]*(r-mid) ;
        col[rt] = 0;
    }
}
void update(int rt,int l,int r,int x,int y,long long v)
{
    if(x<=l&&r<=y)
    {
        col[rt] = v;
        s[rt] = col[rt]*(r-l+1);
        return ;
    }
    int mid = (l+r)>>1;
    down(rt,l,r);
    if(x<=mid) update(rt<<1,l,mid,x,y,v);
    if(mid<y) update(rt<<1|1,mid+1,r,x,y,v);
    up(rt);
}
long long query(int rt,int l,int r,int x,int y)
{
    if(x<=l&&r<=y)
    {
        return s[rt];
    }
    int mid = (l+r)>>1;
    long long res = 0;
    down(rt,l,r);
    if(x<=mid) res+=query(rt<<1,l,mid,x,y);
    if(mid<y) res+=query(rt<<1|1,mid+1,r,x,y);
    return res;
}
int main()
{
    //ios::sync_with_stdio(false);
    //freopen("a.txt","r",stdin);
    //freopen("b.txt","w",stdout);
    int n,m,x,y;
    char str[5];
    scanf("%d",&n);
    for(int i = 1;i<=n;++i) scanf("%lld",&arr[i]);
    for(int i = 1;i<n;++i)  scanf("%lld",&k[i]);
    for(int i = 2;i<n;++i) k[i]+=k[i-1];
    for(int i = 1;i<n;++i) ks[i] = ks[i-1] + k[i];
    build(1,1,n);
    scanf("%d",&m);
    while(m--)
    {
        scanf("%s%d%d",str,&x,&y);
        if(str[0]=='s')
        {
            printf("%lld\n",query(1,1,n,x,y)+ks[y-1]-(x>=2?ks[x-2]:0));
        }
        else
        {
            int l = 1,r = n,mid,ans_ = 1;
            long long sum = query(1,1,n,x,x) + y;
            while(l<=r)
            {
                mid = (l+r)>>1;
                if(sum>query(1,1,n,mid,mid))
                {
                    ans_ = mid;
                    l = mid + 1;
                }
                else r = mid - 1;
            }
            update(1,1,n,x,ans_,sum);
        }
    }
    //fclose(stdin);
    //fclose(stdout);
    //cout << "time: " << (long long)clock() * 1000 / CLOCKS_PER_SEC << " ms" << endl;
    return 0;
}


#include <cstdio>
#include <cstring>
#include <iostream>
#include <queue>
#include <cmath>
#include <map>
#include <stack>
#include <set>
#include <sstream>
#include <vector>
#include <stdlib.h>
#include <algorithm>
using namespace std;

#define dbg(x) cout<<#x<<" = "<< (x)<< endl
#define dbg2(x1,x2) cout<<#x1<<" = "<<x1<<" "<<#x2<<" = "<<x2<<endl
#define dbg3(x1,x2,x3) cout<<#x1<<" = "<<x1<<" "<<#x2<<" = "<<x2<<" "<<#x3<<" = "<<x3<<endl
#define max3(a,b,c) max(a,max(b,c))
#define min3(a,b,c) min(a,min(b,c))

typedef pair<int,int> pll;
typedef long long ll;
const int inf = 0x3f3f3f3f;
const int _inf = 0xc0c0c0c0;
const ll INF = 0x3f3f3f3f3f3f3f3f;
const ll _INF = 0xc0c0c0c0c0c0c0c0;
const ll mod =  (int)1e9+7;

ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll ksm(ll a,ll b,ll mod){int ans=1;while(b){if(b&1) ans=(ans*a)%mod;a=(a*a)%mod;b>>=1;}return ans;}
ll inv2(ll a,ll mod){return ksm(a,mod-2,mod);}
const int MAX_N = 100025;
int col[MAX_N<<2],k[MAX_N],ks[MAX_N],arr[MAX_N];
long long s[MAX_N<<2];
void up(int rt)
{
    s[rt] = s[rt<<1] + s[rt<<1|1];
}
void build(int rt,int l,int r)
{
    if(l==r)
    {
        s[rt] = arr[l] - k [l-1];
        return ;
    }
    int mid = (l+r)>>1;
    build(rt<<1,l,mid);
    build(rt<<1|1,mid+1,r);
    up(rt);
}
void down(int rt,int l,int r)
{
    if(col[rt])
    {
        int mid = (l+r)>>1;
        col[rt<<1] = col[rt];
        col[rt<<1|1] = col[rt];
        s[rt<<1] = (mid-l+1)*col[rt];
        s[rt<<1|1] = (r-mid) *col[rt];
        col[rt] = 0;
    }
}
void update(int rt,int l,int r,int x,int y,int v)
{
    if(x<=l&&r<=y)
    {
        col[rt] = v;
        s[rt] = col[rt]*(r-l+1);
        return ;
    }
    int mid = (l+r)>>1;
    down(rt,l,r);
    if(x<=mid) update(rt<<1,l,mid,x,y,v);
    if(mid<y) update(rt<<1|1,mid+1,r,x,y,v);
    up(rt);
}
long long query(int rt,int l,int r,int x,int y)
{
    if(x<=l&&r<=y)
    {
        return s[rt];
    }
    int mid = (l+r)>>1,res = 0;
    down(rt,l,r);
    if(x<=mid) res+=query(rt<<1,l,mid,x,y);
    if(mid<y) res+=query(rt<<1|1,mid+1,r,x,y);
    return res;
}
int main()
{
    //ios::sync_with_stdio(false);
    //freopen("a.txt","r",stdin);
    //freopen("b.txt","w",stdout);
    int n,m,x,y;
    char str[5];
    scanf("%d",&n);
    for(int i = 1;i<=n;++i) scanf("%d",&arr[i]);
    for(int i = 1;i<n;++i)  scanf("%d",&k[i]);
    for(int i = 2;i<n;++i) k[i]+=k[i-1];
    for(int i = 1;i<n;++i) ks[i] = ks[i-1] + k[i];
    build(1,1,n);
    scanf("%d",&m);
    while(m--)
    {
        scanf("%s%d%d",str,&x,&y);
        if(str[0]=='s')
        {
            printf("%lld\n",query(1,1,n,x,y)+ks[y-1]-(x>=2?ks[x-2]:0));
        }
        else
        {
            int l = 1,r = n,mid;
            int sum = query(1,1,n,x,x) + y;
            while(l<=r)
            {
                mid = (l+r)>>1;
                if(sum>query(1,1,n,mid,mid))
                {
                    l = mid + 1;
                }
                else r = mid - 1;
            }
            update(1,1,n,x,r,sum);
        }
    }
    //fclose(stdin);
    //fclose(stdout);
    //cout << "time: " << (long long)clock() * 1000 / CLOCKS_PER_SEC << " ms" << endl;
    return 0;
}


#include <cstdio>
#include <cstring>
#include <iostream>
#include <queue>
#include <cmath>
#include <map>
#include <stack>
#include <set>
#include <sstream>
#include <vector>
#include <stdlib.h>
#include <algorithm>
using namespace std;

#define dbg(x) cout<<#x<<" = "<< (x)<< endl
#define dbg2(x1,x2) cout<<#x1<<" = "<<x1<<" "<<#x2<<" = "<<x2<<endl
#define dbg3(x1,x2,x3) cout<<#x1<<" = "<<x1<<" "<<#x2<<" = "<<x2<<" "<<#x3<<" = "<<x3<<endl
#define max3(a,b,c) max(a,max(b,c))
#define min3(a,b,c) min(a,min(b,c))

typedef pair<int,int> pll;
typedef long long ll;
const int _inf = 0xc0c0c0c0;
const ll INF = 0x3f3f3f3f3f3f3f3f;
const ll _INF = 0xc0c0c0c0c0c0c0c0;
const ll mod =  (int)1e9+7;
const ll inf = 1e17;
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll ksm(ll a,ll b,ll mod){int ans=1;while(b){if(b&1) ans=(ans*a)%mod;a=(a*a)%mod;b>>=1;}return ans;}
ll inv2(ll a,ll mod){return ksm(a,mod-2,mod);}
const int MAX_N = 200025;
long long s[MAX_N<<2],k[MAX_N],ks[MAX_N],arr[MAX_N],col[MAX_N<<2];
void up(int rt)
{
    s[rt] = s[rt<<1] + s[rt<<1|1];
}
void build(int rt,int l,int r)
{
    col[rt] = inf;
    if(l==r)
    {
        s[rt] = arr[l] - k [l-1];
        return ;
    }
    int mid = (l+r)>>1;
    build(rt<<1,l,mid);
    build(rt<<1|1,mid+1,r);
    up(rt);
}
void down(int rt,int l,int r)
{
    if(col[rt]!=inf)
    {
        int mid = (l+r)>>1;
        col[rt<<1] = col[rt];
        col[rt<<1|1] = col[rt];
        s[rt<<1] = col[rt]*(mid-l+1);
        s[rt<<1|1] = col[rt]*(r-mid) ;
        col[rt] = inf;
    }
}
void update(int rt,int l,int r,int x,int y,long long v)
{
    if(x<=l&&r<=y)
    {
        col[rt] = v;
        s[rt] = col[rt]*(r-l+1);
        return ;
    }
    int mid = (l+r)>>1;
    down(rt,l,r);
    if(x<=mid) update(rt<<1,l,mid,x,y,v);
    if(mid<y) update(rt<<1|1,mid+1,r,x,y,v);
    up(rt);
}
long long query(int rt,int l,int r,int x,int y)
{
    if(x<=l&&r<=y)
    {
        return s[rt];
    }
    int mid = (l+r)>>1;
    long long res = 0;
    down(rt,l,r);
    if(x<=mid) res+=query(rt<<1,l,mid,x,y);
    if(mid<y) res+=query(rt<<1|1,mid+1,r,x,y);
    return res;
}
int main()
{
    //ios::sync_with_stdio(false);
    //freopen("a.txt","r",stdin);
    //freopen("b.txt","w",stdout);
    int n,m,x,y;
    char str[5];
    scanf("%d",&n);
    for(int i = 1;i<=n;++i) scanf("%lld",&arr[i]);
    for(int i = 1;i<n;++i)  scanf("%lld",&k[i]);
    for(int i = 2;i<n;++i) k[i]+=k[i-1];
    for(int i = 1;i<n;++i) ks[i] = ks[i-1] + k[i];
    build(1,1,n);
    scanf("%d",&m);
    while(m--)
    {
        scanf("%s%d%d",str,&x,&y);
        if(str[0]=='s')
        {
            printf("%lld\n",query(1,1,n,x,y)+ks[y-1]-(x>=2?ks[x-2]:0));
        }
        else
        {
            int l = 1,r = n,mid,ans_ = 1;
            long long sum = query(1,1,n,x,x) + y;
            while(l<=r)
            {
                mid = (l+r)>>1;
                if(sum>query(1,1,n,mid,mid))
                {
                    ans_ = mid;
                    l = mid + 1;
                }
                else r = mid - 1;
            }
            update(1,1,n,x,ans_,sum);
        }
    }
    //fclose(stdin);
    //fclose(stdout);
    //cout << "time: " << (long long)clock() * 1000 / CLOCKS_PER_SEC << " ms" << endl;
    return 0;
}


#include <cstdio>
#include <cstring>
#include <iostream>
#include <queue>
#include <cmath>
#include <map>
#include <stack>
#include <set>
#include <sstream>
#include <vector>
#include <stdlib.h>
#include <algorithm>
using namespace std;

#define dbg(x) cout<<#x<<" = "<< (x)<< endl
#define dbg2(x1,x2) cout<<#x1<<" = "<<x1<<" "<<#x2<<" = "<<x2<<endl
#define dbg3(x1,x2,x3) cout<<#x1<<" = "<<x1<<" "<<#x2<<" = "<<x2<<" "<<#x3<<" = "<<x3<<endl
#define max3(a,b,c) max(a,max(b,c))
#define min3(a,b,c) min(a,min(b,c))

typedef pair<int,int> pll;
typedef long long ll;
const int inf = 0x3f3f3f3f;
const int _inf = 0xc0c0c0c0;
const ll INF = 0x3f3f3f3f3f3f3f3f;
const ll _INF = 0xc0c0c0c0c0c0c0c0;
const ll mod =  (int)1e9+7;

ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll ksm(ll a,ll b,ll mod){int ans=1;while(b){if(b&1) ans=(ans*a)%mod;a=(a*a)%mod;b>>=1;}return ans;}
ll inv2(ll a,ll mod){return ksm(a,mod-2,mod);}
const int MAX_N = 200025;
long long s[MAX_N<<2],k[MAX_N],ks[MAX_N],arr[MAX_N],col[MAX_N<<2];
void up(int rt)
{
    s[rt] = s[rt<<1] + s[rt<<1|1];
}
void build(int rt,int l,int r)
{
    if(l==r)
    {
        s[rt] = arr[l] - k [l-1];
        return ;
    }
    int mid = (l+r)>>1;
    build(rt<<1,l,mid);
    build(rt<<1|1,mid+1,r);
    up(rt);
}
void down(int rt,int l,int r)
{
    if(col[rt])
    {
        int mid = (l+r)>>1;
        col[rt<<1] = col[rt];
        col[rt<<1|1] = col[rt];
        s[rt<<1] = (mid-l+1)*col[rt];
        s[rt<<1|1] = (r-mid) *col[rt];
        col[rt] = 0;
    }
}
void update(int rt,int l,int r,int x,int y,int v)
{
    if(x<=l&&r<=y)
    {
        col[rt] = v;
        s[rt] = col[rt]*(r-l+1);
        return ;
    }
    int mid = (l+r)>>1;
    down(rt,l,r);
    if(x<=mid) update(rt<<1,l,mid,x,y,v);
    if(mid<y) update(rt<<1|1,mid+1,r,x,y,v);
    up(rt);
}
long long query(int rt,int l,int r,int x,int y)
{
    if(x<=l&&r<=y)
    {
        return s[rt];
    }
    int mid = (l+r)>>1;
    long long res = 0;
    down(rt,l,r);
    if(x<=mid) res+=query(rt<<1,l,mid,x,y);
    if(mid<y) res+=query(rt<<1|1,mid+1,r,x,y);
    return res;
}
int main()
{
    //ios::sync_with_stdio(false);
    //freopen("a.txt","r",stdin);
    //freopen("b.txt","w",stdout);
    int n,m,x,y;
    char str[5];
    scanf("%d",&n);
    for(int i = 1;i<=n;++i) scanf("%lld",&arr[i]);
    for(int i = 1;i<n;++i)  scanf("%lld",&k[i]);
    for(int i = 2;i<n;++i) k[i]+=k[i-1];
    for(int i = 1;i<n;++i) ks[i] = ks[i-1] + k[i];
    build(1,1,n);
    scanf("%d",&m);
    while(m--)
    {
        scanf("%s%d%d",str,&x,&y);
        if(str[0]=='s')
        {
            printf("%lld\n",query(1,1,n,x,y)+ks[y-1]-(x>=2?ks[x-2]:0));
        }
        else
        {
            int l = 1,r = n,mid;
            int sum = query(1,1,n,x,x) + y;
            while(l<=r)
            {
                mid = (l+r)>>1;
                if(sum>query(1,1,n,mid,mid))
                {
                    l = mid + 1;
                }
                else r = mid - 1;
            }
            update(1,1,n,x,r,sum);
        }
    }
    //fclose(stdin);
    //fclose(stdout);
    //cout << "time: " << (long long)clock() * 1000 / CLOCKS_PER_SEC << " ms" << endl;
    return 0;
}


#include <cstdio>
#include <algorithm>
#include <cmath>
#include <cstring>
using namespace std;
const int N = 1e5 + 5;
const int M = 500;
int n, m;
int a[N], b[N], sb[N];

struct Bl{
	long long fir[M], sum[M], atag[M];
	int size, cnt, bel[N];
	int l[N], r[N];
	void build(){
		size = sqrt(n);
		for(int i = 1; r[i - 1] < n; ++i){
			l[i] = r[i - 1] + 1, r[i] = min(n, size * i);
			//sum[i] = fir[i] = a[l[i]]; bel[l[i]] = i;
			for(int j = l[i]; j <= r[i]; ++j){
				a[j] = max(a[j], a[j - 1] + b[j - 1]);
				sum[i] += a[j];
				bel[j] = i;
				atag[i] += sb[j] - sb[l[i]];
			}
			fir[i] = a[l[i]];
			//printf("%d %d %d %lld\n", i, l[i], r[i], sum[i]);
		}
		cnt = bel[n];
	}
    void update(int x){
    	/*int l = size * (x - 1) + 1, r = min(n, size * x);
    	long long x = sum[x] = fir[x];
		for(int i = l + 1; i <= r; ++i){
    		x += b[i];
			sum[i] += x;
    	}*/
    	sum[x] = a[l[x]] = fir[x];
    	//printf("fir %d\n", x);
    	for(int i = l[x] + 1; i <= r[x]; ++i){
    		a[i] = max(a[i], a[i - 1] + b[i - 1]);
    		sum[x] += a[i];
    	}
    }
    void ins(int x, int y){
    	int pos = bel[x];
    	update(pos);
    	a[x] += y;
		if(x == l[pos]) fir[pos] += y;
		update(pos);

		int end = cnt; //ע��������ܲ�������!!
		for(int i = pos + 1; i <= cnt; ++i)
			if(fir[i] > a[x] + sb[l[i] - 1] - sb[x - 1]){end = i - 1; break;}
		for(int i = pos + 1; i < end; ++i){
			fir[i] = a[x] + sb[l[i] - 1] - sb[x - 1];
			sum[i] = 1ll * (r[i] - l[i] + 1) * fir[i] + atag[i];
		}
		if(end != pos){
			fir[end] = a[x] + sb[l[end] - 1] - sb[x - 1];
			update(end);
		}
    }
    long long qry(int x, int y){
    	long long res = 0;
    	int px = bel[x], py = bel[y];
    	update(px);
    	for(int i = x; i <= min(r[px], y); ++i) res += a[i];
		if(px != py){
    		update(py);
    		for(int i = l[py]; i <= y; ++i) res += a[i];
    	}
    	for(int i = px + 1; i < py; ++i){
    		res += sum[i];
    	}
    	return res;
    }
}bl;

int main(){
    scanf("%d", &n);
    for(int i = 1; i <= n; ++i){
    	scanf("%d", &a[i]);
    }
    for(int i = 1; i < n; ++i){
    	scanf("%d", &b[i]);
    	sb[i] = sb[i - 1] + b[i];
    }

    bl.build();
   /* bl.size = sqrt(n);
    for(int i = 1, cur; i <= n; ++i){
		if(!((i - 1) % bl.size)){
			++cur;
			bl.fir[cur] = a[i];
		}
    	bl.bel[i] = cur;
    	bl.sum[cur] += a[i];
	}
    bl.cnt = bl.bel[n];
    */
    scanf("%d", &m);
    char opt[10];
    for(int i = 1, x, y; i <= m; ++i){
    	scanf("%s%d%d", opt, &x, &y);
    	if(opt[0] == '+'){
    		bl.ins(x, y);
    	}
    	else {
    		printf("%lld\n", bl.qry(x, y));
    	}
    }
    return 0;
}


#include <cstdio>
#include <algorithm>
#include <cmath>
#include <cstring>
using namespace std;
const int N = 1e5 + 5;
const int M = 500;
int n, m;
int a[N], b[N], sb[N];

struct Bl{
	long long fir[M], sum[M], atag[M];
	int size, cnt, bel[N];
	int l[N], r[N];
	void build(){
		size = sqrt(n);
		for(int i = 1; r[i - 1] < n; ++i){
			l[i] = r[i - 1] + 1, r[i] = min(n, size * i);
			//sum[i] = fir[i] = a[l[i]]; bel[l[i]] = i;
			for(int j = l[i]; j <= r[i]; ++j){
				a[j] = max(a[j], a[j - 1] + b[j - 1]);
				sum[i] += a[j];
				bel[j] = i;
				atag[i] += sb[j] - sb[l[i]];
			}
			fir[i] = a[l[i]];
			//printf("%d %d %d %lld\n", i, l[i], r[i], sum[i]);
		}
		cnt = bel[n];
	}
    void update(int x){
    	/*int l = size * (x - 1) + 1, r = min(n, size * x);
    	long long x = sum[x] = fir[x];
		for(int i = l + 1; i <= r; ++i){
    		x += b[i];
			sum[i] += x;
    	}*/
    	sum[x] = a[l[x]] = fir[x];
    	//printf("fir %d\n", x);
    	for(int i = l[x] + 1; i <= r[x]; ++i){
    		a[i] = max(a[i], a[i - 1] + b[i - 1]);
    		sum[x] += a[i];
    	}
    }
    void ins(int x, int y){
    	int pos = bel[x];
    	update(pos);
    	a[x] += y;
		if(x == l[pos]) fir[pos] = a[x];
		update(pos);

		int end = cnt; //ע��������ܲ�������!!
		for(int i = pos + 1; i <= cnt; ++i)
			if(fir[i] > a[x] + sb[l[i] - 1] - sb[x - 1]){end = i - 1; break;}
		for(int i = pos + 1; i < end; ++i){
			fir[i] = a[x] + sb[l[i] - 1] - sb[x - 1];
			sum[i] = 1ll * (r[i] - l[i] + 1) * fir[i] + atag[i];
		}
		if(end != pos){
			fir[end] = a[x] + sb[l[end] - 1] - sb[x - 1];
			update(end);
		}
    }
    long long qry(int x, int y){
    	long long res = 0;
    	int px = bel[x], py = bel[y];
    	update(px);
    	for(int i = x; i <= min(r[px], y); ++i) res += a[i];
		if(px != py){
    		update(py);
    		for(int i = l[py]; i <= y; ++i) res += a[i];
    	}
    	for(int i = px + 1; i < py; ++i){
    		res += sum[i];
    	}
    	return res;
    }
}bl;

int main(){
    scanf("%d", &n);
    for(int i = 1; i <= n; ++i){
    	scanf("%d", &a[i]);
    }
    for(int i = 1; i < n; ++i){
    	scanf("%d", &b[i]);
    	sb[i] = sb[i - 1] + b[i];
    }

    bl.build();
   /* bl.size = sqrt(n);
    for(int i = 1, cur; i <= n; ++i){
		if(!((i - 1) % bl.size)){
			++cur;
			bl.fir[cur] = a[i];
		}
    	bl.bel[i] = cur;
    	bl.sum[cur] += a[i];
	}
    bl.cnt = bl.bel[n];
    */
    scanf("%d", &m);
    char opt[10];
    for(int i = 1, x, y; i <= m; ++i){
    	scanf("%s%d%d", opt, &x, &y);
    	if(opt[0] == '+'){
    		bl.ins(x, y);
    	}
    	else {
    		printf("%lld\n", bl.qry(x, y));
    	}
    }
    return 0;
}


#include <cstdio>
#include <algorithm>
#include <cmath>
#include <cstring>
using namespace std;
const int N = 1e5 + 5;
const int M = 320;
int n, m;
int a[N], b[N], sb[N];

struct Bl{
	long long fir[M], sum[M], atag[M];
	int size, cnt, bel[N];
	int l[N], r[N];
	void build(){
		size = sqrt(n);
		for(int i = 1; r[i - 1] < n; ++i){
			l[i] = r[i - 1] + 1, r[i] = min(n, size * i);
			//printf("%d %d %d\n", i, l[i], r[i]);
			for(int j = l[i]; j <= r[i]; ++j){
				sum[i] += a[j];
				bel[j] = i;
				atag[i] += sb[j] - sb[l[i]];
			}
			fir[i] = a[l[i]];
		}
		cnt = bel[n];
	}
    void update(int x){
    	/*int l = size * (x - 1) + 1, r = min(n, size * x);
    	long long x = sum[x] = fir[x];
		for(int i = l + 1; i <= r; ++i){
    		x += b[i];
			sum[i] += x;
    	}*/
    	sum[x] = a[l[x]] = fir[x];
    	for(int i = l[x] + 1; i <= r[x]; ++i){
    		a[i] = max(a[i], a[i - 1] + b[i - 1]);
    		sum[x] += a[i];
    	}
    }
    void ins(int x, int y){
    	int pos = bel[x];
    	update(pos);
    	a[x] += y;
		if(x == l[pos]) fir[pos] = a[x];
		update(pos);

		for(int i = pos + 1, xx; i <= cnt; ++i){
			xx = fir[pos] + sb[l[i] - 1] - sb[l[pos] - 1];
			if(fir[i] < xx){
				sum[i] = 1ll * (r[i] - l[i] + 1) * xx + atag[i];
				fir[i] = xx;
			}
			else break;
		}
    }
    long long qry(int x, int y){
    	long long res = 0;
    	int px = bel[x], py = bel[y];
    	update(px);
    	for(int i = x; i <= min(r[px], y); ++i) res += a[i];
		if(px != py){
    		update(py);
    		for(int i = l[py]; i <= y; ++i) res += a[i];
    	}
    	for(int i = px + 1; i < py; ++i){
    		res += sum[i];
    	}
    	return res;
    }
}bl;

int main(){
    scanf("%d", &n);
    for(int i = 1; i <= n; ++i){
    	scanf("%d", &a[i]);
    }
    for(int i = 1; i < n; ++i){
    	scanf("%d", &b[i]);
    	sb[i] = sb[i - 1] + b[i];
    }

    bl.build();
   /* bl.size = sqrt(n);
    for(int i = 1, cur; i <= n; ++i){
		if(!((i - 1) % bl.size)){
			++cur;
			bl.fir[cur] = a[i];
		}
    	bl.bel[i] = cur;
    	bl.sum[cur] += a[i];
	}
    bl.cnt = bl.bel[n];
    */
    scanf("%d", &m);
    char opt[10];
    for(int i = 1, x, y; i <= m; ++i){
    	scanf("%s%d%d", opt, &x, &y);
    	if(opt[0] == '+'){
    		bl.ins(x, y);
    	}
    	else {
    		printf("%lld\n", bl.qry(x, y));
    	}
    }
    return 0;
}


#include <cstdio>
#include <algorithm>
#include <cmath>
#include <cstring>
using namespace std;
const int N = 1e5 + 5;
const int M = 500;
int n, m;
int a[N], b[N], sb[N];

struct Bl{
	long long fir[M], sum[M], atag[M];
	int size, cnt, bel[N];
	int l[N], r[N];
	void build(){
		size = sqrt(n);
		for(int i = 1; r[i - 1] < n; ++i){
			l[i] = r[i - 1] + 1, r[i] = min(n, size * i);
			//sum[i] = fir[i] = a[l[i]]; bel[l[i]] = i;
			for(int j = l[i]; j <= r[i]; ++j){
				//a[j] = max(a[j], a[j - 1] + b[j - 1]);
				sum[i] += a[j];
				bel[j] = i;
				atag[i] += sb[j] - sb[l[i]];
			}
			fir[i] = a[l[i]];
			//printf("%d %d %d %lld\n", i, l[i], r[i], sum[i]);
		}
		cnt = bel[n];
	}
    void update(int x){
    	/*int l = size * (x - 1) + 1, r = min(n, size * x);
    	long long x = sum[x] = fir[x];
		for(int i = l + 1; i <= r; ++i){
    		x += b[i];
			sum[i] += x;
    	}*/
    	sum[x] = a[l[x]] = fir[x];
    	//printf("fir %d\n", x);
    	for(int i = l[x] + 1; i <= r[x]; ++i){
    		a[i] = max(a[i], a[i - 1] + b[i - 1]);
    		sum[x] += a[i];
    	}
    }
    void ins(int x, int y){
    	int pos = bel[x];
    	update(pos);
    	a[x] += y;
		if(x == l[pos]) fir[pos] = a[x];
		update(pos);

		int end = cnt; //ע��������ܲ�������!!
		for(int i = pos + 1; i <= cnt; ++i)
			if(fir[i] > a[x] + sb[l[i] - 1] - sb[x - 1]){end = i - 1; break;}
		for(int i = pos + 1; i < end; ++i){
			fir[i] = a[x] + sb[l[i] - 1] - sb[x - 1];
			sum[i] = 1ll * (r[i] - l[i] + 1) * fir[i] + atag[i];
		}
		if(end != pos){
			fir[end] = a[x] + sb[l[end] - 1] - sb[x - 1];
			update(end);
		}
    }
    long long qry(int x, int y){
    	long long res = 0;
    	int px = bel[x], py = bel[y];
    	update(px);
    	for(int i = x; i <= min(r[px], y); ++i) res += a[i];
		if(px != py){
    		update(py);
    		for(int i = l[py]; i <= y; ++i) res += a[i];
    	}
    	for(int i = px + 1; i < py; ++i){
    		res += sum[i];
    	}
    	return res;
    }
}bl;

int main(){
    scanf("%d", &n);
    for(int i = 1; i <= n; ++i){
    	scanf("%d", &a[i]);
    }
    for(int i = 1; i < n; ++i){
    	scanf("%d", &b[i]);
    	sb[i] = sb[i - 1] + b[i];
    }

    bl.build();
   /* bl.size = sqrt(n);
    for(int i = 1, cur; i <= n; ++i){
		if(!((i - 1) % bl.size)){
			++cur;
			bl.fir[cur] = a[i];
		}
    	bl.bel[i] = cur;
    	bl.sum[cur] += a[i];
	}
    bl.cnt = bl.bel[n];
    */
    scanf("%d", &m);
    char opt[10];
    for(int i = 1, x, y; i <= m; ++i){
    	scanf("%s%d%d", opt, &x, &y);
    	if(opt[0] == '+'){
    		bl.ins(x, y);
    	}
    	else {
    		printf("%lld\n", bl.qry(x, y));
    	}
    }
    return 0;
}


#include <cstdio>
#include <algorithm>
#include <cmath>
#include <cstring>
using namespace std;
const int N = 1e5 + 5;
const int M = 320;
int n, m;
int a[N], b[N], sb[N];

struct Bl{
	long long fir[M], sum[M], atag[M];
	int size, cnt, bel[N];
	int l[N], r[N];
	void build(){
		size = sqrt(n);
		for(int i = 1; r[i - 1] < n; ++i){
			l[i] = r[i - 1] + 1, r[i] = min(n, size * i);
			//printf("%d %d %d\n", i, l[i], r[i]);
			for(int j = l[i]; j <= r[i]; ++j){
				sum[i] += a[j];
				bel[j] = i;
				atag[i] += sb[j] - sb[l[i]];
			}
			fir[i] = a[l[i]];
		}
		cnt = bel[n];
	}
    void update(int x){
    	/*int l = size * (x - 1) + 1, r = min(n, size * x);
    	long long x = sum[x] = fir[x];
		for(int i = l + 1; i <= r; ++i){
    		x += b[i];
			sum[i] += x;
    	}*/
    	sum[x] = a[l[x]] = fir[x];
    	for(int i = l[x] + 1; i <= r[x]; ++i){
    		a[i] = max(a[i], a[i - 1] + b[i - 1]);
    		sum[x] += a[i];
    	}
    }
    void ins(int x, int y){
    	int pos = bel[x];
    	update(pos);
    	a[x] += y;
		if(x == l[pos]) fir[pos] = a[x];
		update(pos);

		for(int i = pos + 1, xx; i <= cnt; ++i){
			xx = fir[pos] + sb[l[i] - 1] - sb[l[pos] - 1];
			if(fir[i] < xx){
				sum[i] = 1ll * (r[i] - l[i] + 1) * (xx - fir[i]);
				fir[i] = xx;
			}
			else break;
		}
    }
    long long qry(int x, int y){
    	long long res = 0;
    	int px = bel[x], py = bel[y];
    	update(px);
    	for(int i = x; i <= min(r[px], y); ++i) res += a[i];
		if(px != py){
    		update(py);
    		for(int i = l[py]; i <= y; ++i) res += a[i];
    	}
    	for(int i = px + 1; i < py; ++i){
    		res += sum[i];
    	}
    	return res;
    }
}bl;

int main(){
    scanf("%d", &n);
    for(int i = 1; i <= n; ++i){
    	scanf("%d", &a[i]);
    }
    for(int i = 1; i < n; ++i){
    	scanf("%d", &b[i]);
    	sb[i] = sb[i - 1] + b[i];
    }

    bl.build();
   /* bl.size = sqrt(n);
    for(int i = 1, cur; i <= n; ++i){
		if(!((i - 1) % bl.size)){
			++cur;
			bl.fir[cur] = a[i];
		}
    	bl.bel[i] = cur;
    	bl.sum[cur] += a[i];
	}
    bl.cnt = bl.bel[n];
    */
    scanf("%d", &m);
    char opt[10];
    for(int i = 1, x, y; i <= m; ++i){
    	scanf("%s%d%d", opt, &x, &y);
    	if(opt[0] == '+'){
    		bl.ins(x, y);
    	}
    	else {
    		printf("%lld\n", bl.qry(x, y));
    	}
    }
    return 0;
}


#include <cstdio>
#include <algorithm>
#include <cmath>
#include <cstring>
using namespace std;
const int N = 1e5 + 5;
const int M = 500;
int n, m;
int a[N], b[N], sb[N];

struct Bl{
	long long fir[M], sum[M], atag[M];
	int size, cnt, bel[N];
	int l[N], r[N];
	void build(){
		size = sqrt(n);
		for(int i = 1; r[i - 1] < n; ++i){
			l[i] = r[i - 1] + 1, r[i] = min(n, size * i);
			sum[i] = fir[i] = a[l[i]]; bel[l[i]] = i;
			for(int j = l[i] + 1; j <= r[i]; ++j){
				a[j] = max(a[j], a[j - 1] + b[j - 1]);
				sum[i] += a[j];
				bel[j] = i;
				atag[i] += sb[j] - sb[l[i]];
			}
			//printf("%d %d %d %lld\n", i, l[i], r[i], sum[i]);
		}
		cnt = bel[n];
	}
    void update(int x){
    	/*int l = size * (x - 1) + 1, r = min(n, size * x);
    	long long x = sum[x] = fir[x];
		for(int i = l + 1; i <= r; ++i){
    		x += b[i];
			sum[i] += x;
    	}*/
    	sum[x] = a[l[x]] = fir[x];
    	//printf("fir %d\n", x);
    	for(int i = l[x] + 1; i <= r[x]; ++i){
    		a[i] = max(a[i], a[i - 1] + b[i - 1]);
    		sum[x] += a[i];
    	}
    }
    void ins(int x, int y){
    	int pos = bel[x];
    	update(pos);
    	a[x] += y;
		if(x == l[pos]) fir[pos] = a[x];
		update(pos);

		long long xx;
		int end = cnt + 1; //ע��������ܲ�������!!
		for(int i = pos + 1; i <= cnt; ++i)
			if(fir[i] > fir[pos] + sb[l[i] - 1] - sb[l[pos] - 1]){end = i - 1; break;}
		for(int i = pos + 1; i < end; ++i){
			fir[i] = fir[pos] + sb[l[i] - 1] - sb[l[pos] - 1];
			sum[i] = 1ll * (r[i] - l[i] + 1) * fir[i] + atag[i];
		}
		if(end != pos){
			fir[end] = fir[pos] + sb[l[end] - 1] - sb[l[pos] - 1];
			update(end);
		}
    }
    long long qry(int x, int y){
    	long long res = 0;
    	int px = bel[x], py = bel[y];
    	update(px);
    	for(int i = x; i <= min(r[px], y); ++i) res += a[i];
		if(px != py){
    		update(py);
    		for(int i = l[py]; i <= y; ++i) res += a[i];
    	}
    	for(int i = px + 1; i < py; ++i){
    		res += sum[i];
    	}
    	return res;
    }
}bl;

int main(){
    scanf("%d", &n);
    for(int i = 1; i <= n; ++i){
    	scanf("%d", &a[i]);
    }
    for(int i = 1; i < n; ++i){
    	scanf("%d", &b[i]);
    	sb[i] = sb[i - 1] + b[i];
    }

    bl.build();
   /* bl.size = sqrt(n);
    for(int i = 1, cur; i <= n; ++i){
		if(!((i - 1) % bl.size)){
			++cur;
			bl.fir[cur] = a[i];
		}
    	bl.bel[i] = cur;
    	bl.sum[cur] += a[i];
	}
    bl.cnt = bl.bel[n];
    */
    scanf("%d", &m);
    char opt[10];
    for(int i = 1, x, y; i <= m; ++i){
    	scanf("%s%d%d", opt, &x, &y);
    	if(opt[0] == '+'){
    		bl.ins(x, y);
    	}
    	else {
    		printf("%lld\n", bl.qry(x, y));
    	}
    }
    return 0;
}


#include<iostream>
#include<cstdio>
#include<cmath>
#include<cstdlib>
#include<cstring>
#include<algorithm>
#include<map>
using namespace std;
#define ll long long
#define N 100010
char getc(){char c=getchar();while ((c<'A'||c>'Z')&&(c<'a'||c>'z')&&(c<'0'||c>'9')) c=getchar();return c;}
int gcd(int n,int m){return m==0?n:gcd(m,n%m);}
int read()
{
    int x=0,f=1;char c=getchar();
    while (c<'0'||c>'9') {if (c=='-') f=-1;c=getchar();}
    while (c>='0'&&c<='9') x=(x<<1)+(x<<3)+(c^48),c=getchar();
    return x*f;
}
int n,q,b[N],block,num,pos[N],L[N],R[N];
ll S[N],SS[N],sum[N],a[N],first[N],val[N];
void update(int k)
{
    a[L[k]]=first[k];sum[k]=a[L[k]];
    for (int i=L[k]+1;i<=R[k];i++)
    a[i]=max(a[i],a[i-1]+b[i-1]),sum[k]+=a[i];
}
signed main()
{
#ifndef ONLINE_JUDGE
    freopen("a.in","r",stdin);
    freopen("a.out","w",stdout);
#endif
    n=read();block=sqrt(n);num=(n-1)/block+1;
    for (int i=1;i<=n;i++) a[i]=read();
    for (int i=1;i<n;i++) b[i]=read();
    for (int i=1;i<n;i++) S[i]=S[i-1]+b[i];
    for (int i=1;i<=num;i++)
    {
        L[i]=R[i-1]+1;R[i]=min(n,L[i]+block-1);
        for (int j=L[i];j<=R[i];j++)
        {
            if (j==L[i]) SS[j]=0;
            else SS[j]=SS[j-1]+b[j-1];
            val[i]+=SS[j];
            pos[j]=i,sum[i]+=a[j];
        }
        first[i]=a[L[i]];
    }
    q=read();
    while (q--)
    {
        char c=getchar();
        while (c!='+'&&c!='s') c=getchar();
        if (c=='+')
        {
            int p=read(),x=read();
            update(pos[p]);
            a[p]+=x;if (p==L[pos[p]]) first[pos[p]]+=x;
            update(pos[p]);
            int u=num+1;
            for (int i=pos[p]+1;i<=num;i++)
            if (first[i]>a[p]+S[L[i]-1]-S[p-1]) {u=i;break;}
            u--;
            for (int i=pos[p]+1;i<u;i++)
            first[i]=a[p]+S[L[i]-1]-S[p-1],
            sum[i]=1ll*first[i]*(R[i]-L[i]+1)+val[i];
            if (u!=pos[p])
            {
                first[u]=a[p]+S[L[u]-1]-S[p-1];
                update(u);
            }
        }
        else
        {
            int l=read(),r=read();
            if (pos[l]==pos[r])
            {
                update(pos[l]);ll ans=0;
                for (int i=l;i<=r;i++) ans+=a[i];
                printf("%I64d\n",ans);
            }
            else
            {
                update(pos[l]),update(pos[r]);ll ans=0;
                for (int i=l;i<=R[pos[l]];i++) ans+=a[i];
                for (int i=L[pos[r]];i<=r;i++) ans+=a[i];
                for (int i=pos[l]+1;i<pos[r];i++) ans+=sum[i];
                printf("%I64d\n",ans);
            }
        }
    }
    return 0;
    //NOTICE LONG LONG!!!!!
}


#include <cstdio>
#include <algorithm>
#include <cmath>
#include <cstring>
using namespace std;
const int N = 1e5 + 5;
const int M = 320;
int n, m;
int a[N], b[N], sb[N];

struct Bl{
	long long fir[M], sum[M], atag[M];
	int size, cnt, bel[N];
	int l[N], r[N];
	void build(){
		size = sqrt(n);
		for(int i = 1; r[i - 1] < n; ++i){
			l[i] = r[i - 1] + 1, r[i] = min(n, size * i);
			//printf("%d %d %d\n", i, l[i], r[i]);
			for(int j = l[i]; j <= r[i]; ++j){
				sum[i] += a[j];
				bel[j] = i;
				atag[i] += sb[j] - sb[l[i]];
			}
			fir[i] = a[l[i]];
		}
		cnt = bel[n];
	}
    void update(int x){
    	/*int l = size * (x - 1) + 1, r = min(n, size * x);
    	long long x = sum[x] = fir[x];
		for(int i = l + 1; i <= r; ++i){
    		x += b[i];
			sum[i] += x;
    	}*/
    	sum[x] = a[l[x]] = fir[x];
    	for(int i = l[x] + 1; i <= r[x]; ++i){
    		a[i] = max(a[i], a[i - 1] + b[i - 1]);
    		sum[x] += a[i];
    	}
    }
    void ins(int x, int y){
    	int pos = bel[x];
    	update(pos);
    	a[x] += y;
		if(x == l[pos]) fir[pos] = a[x];
		update(pos);

		for(int i = pos + 1, xx; i <= cnt; ++i){
			xx = fir[pos] + sb[l[i] - 1] - sb[l[pos] - 1];
			if(fir[i] < xx){
				sum[i] = 1ll * (r[i] - l[i] + 1) * (xx - fir[i]);
				fir[i] = xx;
			}
			else break;
		}
    }
    long long qry(int x, int y){
    	long long res = 0;
    	int px = bel[x], py = bel[y];
    	update(px);
    	for(int i = x; i <= r[px]; ++i) res += a[i];
		if(px != py){
    		update(py);
    		for(int i = l[py]; i <= y; ++i) res += a[i];
    	}
    	for(int i = px + 1; i < py; ++i){
    		res += sum[i];
    	}
    	return res;
    }
}bl;

int main(){
    scanf("%d", &n);
    for(int i = 1; i <= n; ++i){
    	scanf("%d", &a[i]);
    }
    for(int i = 1; i < n; ++i){
    	scanf("%d", &b[i]);
    	sb[i] = sb[i - 1] + b[i];
    }

    bl.build();
   /* bl.size = sqrt(n);
    for(int i = 1, cur; i <= n; ++i){
		if(!((i - 1) % bl.size)){
			++cur;
			bl.fir[cur] = a[i];
		}
    	bl.bel[i] = cur;
    	bl.sum[cur] += a[i];
	}
    bl.cnt = bl.bel[n];
    */
    scanf("%d", &m);
    char opt[10];
    for(int i = 1, x, y; i <= m; ++i){
    	scanf("%s%d%d", opt, &x, &y);
    	if(opt[0] == '+'){
    		bl.ins(x, y);
    	}
    	else {
    		printf("%lld\n", bl.qry(x, y));
    	}
    }
    return 0;
}


#include <cstdio>
#include <algorithm>
#include <cmath>
#include <cstring>
using namespace std;
const int N = 1e5 + 5;
const int M = 500;
int n, m;
long long a[N], b[N], sb[N];

struct Bl{
	long long fir[M], sum[M], atag[M];
	int size, cnt, bel[N];
	int l[N], r[N];
	void build(){
		size = sqrt(n);
		cnt = (n - 1) / size + 1;
		for(int i = 1; i <= cnt; ++i){
			l[i] = r[i - 1] + 1, r[i] = min(n, l[i] + size - 1);
			for(int j = l[i]; j <= r[i]; ++j){
				sum[i] += a[j];
				bel[j] = i;
				atag[i] += sb[j - 1] - sb[l[i] - 1];
			}
			fir[i] = a[l[i]];
		}
	}
    void update(int x){
    	a[l[x]] = fir[x]; sum[x] = a[l[x]];
    	for(int i = l[x] + 1; i <= r[x]; ++i){
    		a[i] = max(a[i], a[i - 1] + b[i - 1]);
    		sum[x] += a[i];
    	}
    }
    void ins(int x, int y){
    	int pos = bel[x];
    	update(pos);
    	a[x] += y;
		if(x == l[pos]) fir[pos] += y;
		update(pos);

		int end = cnt; //ע��������ܲ�������!!
		for(int i = pos + 1; i <= cnt; ++i)
			if(fir[i] > a[x] + sb[l[i] - 1] - sb[x - 1]){end = i - 1; break;}
		for(int i = pos + 1; i < end; ++i){
			fir[i] = a[x] + sb[l[i] - 1] - sb[x - 1];
			sum[i] = 1ll * (r[i] - l[i] + 1) * fir[i] + atag[i];
		}
		if(end != pos){
			fir[end] = a[x] + sb[l[end] - 1] - sb[x - 1];
			update(end);
		}
    }
    long long qry(int x, int y){
    	long long res = 0;
    	int px = bel[x], py = bel[y];
    	if(px == py){
    	    update(px);
    	    for(int i = x; i <= y; ++i) res += a[i];
    	    return res;
    	}
    	update(px);
    	for(int i = x; i <= r[px]; ++i) res += a[i];
    	update(py);
    	for(int i = l[py]; i <= y; ++i) res += a[i];

    	for(int i = px + 1; i < py; ++i){
    		res += sum[i];
    	}
    	return res;
    }
}bl;

int main(){
    scanf("%d", &n);
    for(int i = 1; i <= n; ++i){
    	scanf("%lld", &a[i]);
    }
    for(int i = 1; i < n; ++i){
    	scanf("%lld", &b[i]);
    	sb[i] = sb[i - 1] + b[i];
    }

    bl.build();
    scanf("%d", &m);
    char opt[10];
    for(int i = 1, x, y; i <= m; ++i){
    	scanf("%s%d%d", opt, &x, &y);
    	if(opt[0] == '+'){
    		bl.ins(x, y);
    	}
    	else {
    		printf("%lld\n", bl.qry(x, y));
    	}
    }
    return 0;
}


#include <cstdio>
#include <algorithm>
#include <cmath>
#include <cstring>
using namespace std;
const int N = 1e5 + 5;
const int M = 500;
int n, m;
int a[N], b[N], sb[N];

struct Bl{
	long long fir[M], sum[M], atag[M];
	int size, cnt, bel[N];
	int l[N], r[N];
	void build(){
		size = sqrt(n);
		for(int i = 1; r[i - 1] < n; ++i){
			l[i] = r[i - 1] + 1, r[i] = min(n, size * i);
			sum[i] = fir[i] = a[l[i]]; bel[l[i]] = i;
			for(int j = l[i] + 1; j <= r[i]; ++j){
				a[j] = max(a[j], a[j - 1] + b[j - 1]);
				sum[i] += a[j];
				bel[j] = i;
				atag[i] += sb[j] - sb[l[i]];
			}
			//printf("%d %d %d %lld\n", i, l[i], r[i], sum[i]);
		}
		cnt = bel[n];
	}
    void update(int x){
    	/*int l = size * (x - 1) + 1, r = min(n, size * x);
    	long long x = sum[x] = fir[x];
		for(int i = l + 1; i <= r; ++i){
    		x += b[i];
			sum[i] += x;
    	}*/
    	sum[x] = a[l[x]] = fir[x];
    	//printf("fir %d\n", x);
    	for(int i = l[x] + 1; i <= r[x]; ++i){
    		a[i] = max(a[i], a[i - 1] + b[i - 1]);
    		sum[x] += a[i];
    	}
    }
    void ins(int x, int y){
    	int pos = bel[x];
    	update(pos);
    	a[x] += y;
		if(x == l[pos]) fir[pos] = a[x];
		update(pos);

		int end = cnt + 1; //ע��������ܲ�������!!
		for(int i = pos + 1; i <= cnt; ++i)
			if(fir[i] > a[x] + sb[l[i] - 1] - sb[x - 1]){end = i - 1; break;}
		for(int i = pos + 1; i < end; ++i){
			fir[i] = a[x] + sb[l[i] - 1] - sb[x - 1];
			sum[i] = 1ll * (r[i] - l[i] + 1) * fir[i] + atag[i];
		}
		if(end != pos){
			fir[end] = a[x] + sb[l[end] - 1] - sb[x - 1];
			update(end);
		}
    }
    long long qry(int x, int y){
    	long long res = 0;
    	int px = bel[x], py = bel[y];
    	update(px);
    	for(int i = x; i <= min(r[px], y); ++i) res += a[i];
		if(px != py){
    		update(py);
    		for(int i = l[py]; i <= y; ++i) res += a[i];
    	}
    	for(int i = px + 1; i < py; ++i){
    		res += sum[i];
    	}
    	return res;
    }
}bl;

int main(){
    scanf("%d", &n);
    for(int i = 1; i <= n; ++i){
    	scanf("%d", &a[i]);
    }
    for(int i = 1; i < n; ++i){
    	scanf("%d", &b[i]);
    	sb[i] = sb[i - 1] + b[i];
    }

    bl.build();
   /* bl.size = sqrt(n);
    for(int i = 1, cur; i <= n; ++i){
		if(!((i - 1) % bl.size)){
			++cur;
			bl.fir[cur] = a[i];
		}
    	bl.bel[i] = cur;
    	bl.sum[cur] += a[i];
	}
    bl.cnt = bl.bel[n];
    */
    scanf("%d", &m);
    char opt[10];
    for(int i = 1, x, y; i <= m; ++i){
    	scanf("%s%d%d", opt, &x, &y);
    	if(opt[0] == '+'){
    		bl.ins(x, y);
    	}
    	else {
    		printf("%lld\n", bl.qry(x, y));
    	}
    }
    return 0;
}


#include <cstdio>
#include <algorithm>
#include <cmath>
#include <cstring>
using namespace std;
const int N = 1e5 + 5;
const int M = 500;
int n, m;
long long a[N], b[N], sb[N];

struct Bl{
	long long fir[M], sum[M], atag[M];
	int size, cnt, bel[N];
	int l[N], r[N];
	void build(){
		size = sqrt(n);
		cnt = (n - 1) / size + 1;
		for(int i = 1; i <= cnt; ++i){
			l[i] = r[i - 1] + 1, r[i] = min(n, size * i);
			for(int j = l[i]; j <= r[i]; ++j){
				sum[i] += a[j];
				bel[j] = i;
				atag[i] += sb[j] - sb[l[i]];
			}
			fir[i] = a[l[i]];
		}
	}
    void update(int x){
    	a[l[x]] = fir[x]; sum[x] = a[l[x]];
    	for(int i = l[x] + 1; i <= r[x]; ++i){
    		a[i] = max(a[i], a[i - 1] + b[i - 1]);
    		sum[x] += a[i];
    	}
    }
    void ins(int x, int y){
    	int pos = bel[x];
    	update(pos);
    	a[x] += y;
		if(x == l[pos]) fir[pos] += y;
		update(pos);

		int end = cnt; //ע��������ܲ�������!!
		for(int i = pos + 1; i <= cnt; ++i)
			if(fir[i] > a[x] + sb[l[i] - 1] - sb[x - 1]){end = i - 1; break;}
		for(int i = pos + 1; i < end; ++i){
			fir[i] = a[x] + sb[l[i] - 1] - sb[x - 1];
			sum[i] = 1ll * (r[i] - l[i] + 1) * fir[i] + atag[i];
		}
		if(end != pos){
			fir[end] = a[x] + sb[l[end] - 1] - sb[x - 1];
			update(end);
		}
    }
    long long qry(int x, int y){
    	long long res = 0;
    	int px = bel[x], py = bel[y];
    	if(px == py){
    	    update(px);
    	    for(int i = x; i <= y; ++i) res += a[i];
    	    return res;
    	}
    	update(px);
    	for(int i = x; i <= r[px]; ++i) res += a[i];
    	update(py);
    	for(int i = l[py]; i <= y; ++i) res += a[i];

    	for(int i = px + 1; i < py; ++i){
    		res += sum[i];
    	}
    	return res;
    }
}bl;

int main(){
    scanf("%d", &n);
    for(int i = 1; i <= n; ++i){
    	scanf("%lld", &a[i]);
    }
    for(int i = 1; i < n; ++i){
    	scanf("%lld", &b[i]);
    	sb[i] = sb[i - 1] + b[i];
    }

    bl.build();
    scanf("%d", &m);
    char opt[10];
    for(int i = 1, x, y; i <= m; ++i){
    	scanf("%s%d%d", opt, &x, &y);
    	if(opt[0] == '+'){
    		bl.ins(x, y);
    	}
    	else {
    		printf("%lld\n", bl.qry(x, y));
    	}
    }
    return 0;
}


#include <cstdio>
#include <algorithm>
#include <cmath>
#include <cstring>
using namespace std;
const int N = 1e5 + 5;
const int M = 500;
int n, m;
int a[N], b[N], sb[N];

struct Bl{
	long long fir[M], sum[M], atag[M];
	int size, cnt, bel[N];
	int l[N], r[N];
	void build(){
		size = sqrt(n);
		for(int i = 1; r[i - 1] < n; ++i){
			l[i] = r[i - 1] + 1, r[i] = min(n, size * i);
			sum[i] = fir[i] = a[l[i]]; bel[l[i]] = i;
			for(int j = l[i] + 1; j <= r[i]; ++j){
				a[j] = max(a[j], a[j - 1] + b[j - 1]);
				sum[i] += a[j];
				bel[j] = i;
				atag[i] += sb[j] - sb[l[i]];
			}
			//printf("%d %d %d %lld\n", i, l[i], r[i], sum[i]);
		}
		cnt = bel[n];
	}
    void update(int x){
    	/*int l = size * (x - 1) + 1, r = min(n, size * x);
    	long long x = sum[x] = fir[x];
		for(int i = l + 1; i <= r; ++i){
    		x += b[i];
			sum[i] += x;
    	}*/
    	sum[x] = a[l[x]] = fir[x];
    	//printf("fir %d\n", x);
    	for(int i = l[x] + 1; i <= r[x]; ++i){
    		a[i] = max(a[i], a[i - 1] + b[i - 1]);
    		sum[x] += a[i];
    	}
    }
    void ins(int x, int y){
    	int pos = bel[x];
    	update(pos);
    	a[x] += y;
		if(x == l[pos]) fir[pos] = a[x];
		update(pos);

		int end = cnt; //ע��������ܲ�������!!
		for(int i = pos + 1; i <= cnt; ++i)
			if(fir[i] > a[x] + sb[l[i] - 1] - sb[x - 1]){end = i - 1; break;}
		for(int i = pos + 1; i < end; ++i){
			fir[i] = a[x] + sb[l[i] - 1] - sb[x - 1];
			sum[i] = 1ll * (r[i] - l[i] + 1) * fir[i] + atag[i];
		}
		if(end != pos){
			fir[end] = a[x] + sb[l[end] - 1] - sb[x - 1];
			update(end);
		}
    }
    long long qry(int x, int y){
    	long long res = 0;
    	int px = bel[x], py = bel[y];
    	update(px);
    	for(int i = x; i <= min(r[px], y); ++i) res += a[i];
		if(px != py){
    		update(py);
    		for(int i = l[py]; i <= y; ++i) res += a[i];
    	}
    	for(int i = px + 1; i < py; ++i){
    		res += sum[i];
    	}
    	return res;
    }
}bl;

int main(){
    scanf("%d", &n);
    for(int i = 1; i <= n; ++i){
    	scanf("%d", &a[i]);
    }
    for(int i = 1; i < n; ++i){
    	scanf("%d", &b[i]);
    	sb[i] = sb[i - 1] + b[i];
    }

    bl.build();
   /* bl.size = sqrt(n);
    for(int i = 1, cur; i <= n; ++i){
		if(!((i - 1) % bl.size)){
			++cur;
			bl.fir[cur] = a[i];
		}
    	bl.bel[i] = cur;
    	bl.sum[cur] += a[i];
	}
    bl.cnt = bl.bel[n];
    */
    scanf("%d", &m);
    char opt[10];
    for(int i = 1, x, y; i <= m; ++i){
    	scanf("%s%d%d", opt, &x, &y);
    	if(opt[0] == '+'){
    		bl.ins(x, y);
    	}
    	else {
    		printf("%lld\n", bl.qry(x, y));
    	}
    }
    return 0;
}


#include <cstdio>
#include <algorithm>
#include <cmath>
#include <cstring>
using namespace std;
const int N = 1e5 + 5;
const int M = 500;
int n, m;
long long a[N], b[N], sb[N];

struct Bl{
	long long fir[M], sum[M], atag[M];
	int size, cnt, bel[N];
	int l[N], r[N];
	void build(){
		size = sqrt(n);
		for(int i = 1; r[i - 1] < n; ++i){
			l[i] = r[i - 1] + 1, r[i] = min(n, size * i);
			//sum[i] = fir[i] = a[l[i]]; bel[l[i]] = i;
			for(int j = l[i]; j <= r[i]; ++j){
				//a[j] = max(a[j], a[j - 1] + b[j - 1]);
				sum[i] += a[j];
				bel[j] = i;
				atag[i] += sb[j] - sb[l[i]];
			}
			fir[i] = a[l[i]];
			//printf("%d %d %d %lld\n", i, l[i], r[i], sum[i]);
		}
		cnt = bel[n];
	}
    void update(int x){
    	/*int l = size * (x - 1) + 1, r = min(n, size * x);
    	long long x = sum[x] = fir[x];
		for(int i = l + 1; i <= r; ++i){
    		x += b[i];
			sum[i] += x;
    	}*/
    	a[l[x]] = fir[x]; sum[x] = a[l[x]];
    	//printf("fir %d\n", x);
    	for(int i = l[x] + 1; i <= r[x]; ++i){
    		a[i] = max(a[i], a[i - 1] + b[i - 1]);
    		sum[x] += a[i];
    	}
    }
    void ins(int x, int y){
    	int pos = bel[x];
    	update(pos);
    	a[x] += y;
		if(x == l[pos]) fir[pos] = a[x];
		update(pos);

		int end = cnt; //ע��������ܲ�������!!
		for(int i = pos + 1; i <= cnt; ++i)
			if(fir[i] > a[x] + sb[l[i] - 1] - sb[x - 1]){end = i - 1; break;}
		for(int i = pos + 1; i < end; ++i){
			fir[i] = a[x] + sb[l[i] - 1] - sb[x - 1];
			sum[i] = 1ll * (r[i] - l[i] + 1) * fir[i] + atag[i];
		}
		if(end != pos){
			fir[end] = a[x] + sb[l[end] - 1] - sb[x - 1];
			update(end);
		}
    }
    long long qry(int x, int y){
    	long long res = 0;
    	int px = bel[x], py = bel[y];
    	update(px);
    	for(int i = x; i <= min(r[px], y); ++i) res += a[i];
		if(px != py){
    		update(py);
    		for(int i = l[py]; i <= y; ++i) res += a[i];
    	}
    	for(int i = px + 1; i < py; ++i){
    		res += sum[i];
    	}
    	return res;
    }
}bl;

int main(){
    scanf("%d", &n);
    for(int i = 1; i <= n; ++i){
    	scanf("%lld", &a[i]);
    }
    for(int i = 1; i < n; ++i){
    	scanf("%lld", &b[i]);
    	sb[i] = sb[i - 1] + b[i];
    }

    bl.build();
    scanf("%d", &m);
    char opt[10];
    for(int i = 1, x, y; i <= m; ++i){
    	scanf("%s%d%d", opt, &x, &y);
    	if(opt[0] == '+'){
    		bl.ins(x, y);
    	}
    	else {
    		printf("%lld\n", bl.qry(x, y));
    	}
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define db double
#define all(x) x.begin(), x.end()
#define SZ(x) (int)(x.size())
#define mem(x, y) memset(x, y, sizeof(x))
#define what_is(x) cerr <<  "Line " << __LINE__ << ": " << #x << " is " << (x) << endl;
#define suf_zero(x) __builtin_ffs(x)
#define pre_zero(x) __builtin_clz(x)
#define num_one(x) __builtin_popcount(x)
#define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }
#define mt make_tuple
#define mp make_pair
#define eb emplace_back
#define INFI 2000000009
#define INFLL (ll)1e18+7
#define ig ignore
#define fi first
#define TP tuple<int, int, int>
#define se second
#define lson l, mid, rt<<1
#define rson mid+1, r, rt<<1|1
#define PII pair<int, int>
#define rep(i, begin, end) for(__typeof(end) i =(begin)-((begin)>(end));i!=(end)-((begin)>(end));i+=1-2*((begin)>(end)))
void err(istream_iterator<string> it) {cerr<<endl;}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
	cerr << *it << " = " << a << " , ";
	err(++it, args...);
}// fast IO
namespace fastIO{
    #define BUF_SIZE 100000
//     fread -> read
    bool IOerror = 0;
    inline char nc(){
        static char buf[BUF_SIZE], *p1 = buf+BUF_SIZE,
         *pend = buf+BUF_SIZE;
         if(p1==pend){
             p1 = buf;
             pend = buf+fread(buf, 1, BUF_SIZE, stdin);
             if(pend==p1){
                 IOerror = 1;
                 return -1;
             }
         }
         return *p1++;
    }
    inline bool blank(char ch){return ch==' '||ch=='\n'||ch=='\r'||ch=='\t';}
    inline void read(int &x){
        char ch;
        while(blank(ch=nc()));
        if(IOerror)return ;
        for(x=ch-'0';(ch=nc())>='0'&&ch<='9';x=x*10+ch-'0');
    }
    #undef BUF_SIZE
}
using namespace fastIO;
//#include<ext/pb_ds/assoc_container.hpp>
//#include<ext/pb_ds/hash_policy.hpp>
//using namespace __gnu_pbds;
const double PI = acos(-1.0);
const double eps = 1e-8;
const ll mod = 1e9+7;
ll qp(ll b, ll n){ll r=1;if(n<0)n+=mod-1;b%=mod;for(;n;n>>=1,b=b*b%mod)if(n&1)r=r*b%mod;return r;}
int sgn(double x){if(x<-eps)return -1;return x>eps?1:0;}
/////////////// Macro ///////////////
const int maxn = 1e6+7;
ll sum[maxn<<2], k[maxn], mx[maxn<<2], st[maxn<<2], a[maxn];
void pushup(int rt){sum[rt]=sum[rt<<1]+sum[rt<<1|1];mx[rt]=max(mx[rt<<1], mx[rt<<1|1]);}
void pushdown(int rt, int len)
{
    if(st[rt]==0)return;
    st[rt<<1] = st[rt<<1|1] = mx[rt<<1] = mx[rt<<1|1] = st[rt];
    sum[rt<<1] = st[rt] * ((len+1)/2);
    sum[rt<<1|1] = st[rt] * (len/2);
    st[rt]=0;
}
void build(int l, int r, int rt)
{
    st[rt]=0;
    if(l==r) {sum[rt]=a[l]-k[l];mx[rt]=sum[rt];return;}
    int mid = l+r>>1;
    build(lson);build(rson);
    pushup(rt);
}
void update(int L, int R, ll x, int l, int r, int rt)
{
    if(L<=l&&r<=R) {sum[rt]=x*(r-l+1);mx[rt]=x;st[rt]=x;return;}
    int mid = l+r>>1;pushdown(rt, r-l+1);
    if(L<=mid) update(L, R, x, lson);
    if(mid<R) update(L, R, x, rson);
    pushup(rt);
}
ll query_sum(int L, int R, int l, int r, int rt)
{
    if(L<=l&&r<=R) return sum[rt];
    int mid = l+r>>1;pushdown(rt, r-l+1);
    ll res = 0;
    if(L<=mid) res = query_sum(L, R, lson);
    if(mid <R) res += query_sum(L, R, rson);
    return res;
}
ll query_mx(int x, int l, int r, int rt)
{
    if(l==r) return l;
    int mid = l+r>>1; pushdown(rt, r-l+1);
    if(mx[rt<<1]>=x) return query_mx(x, lson);
    else return query_mx(x, rson);
}
ll sum_sum_k[maxn];
int main()
{
    int n;scanf("%d", &n);
    for(int i=1;i<=n;++i) scanf("%lld", &a[i]);
    for(int i=2;i<=n;++i) scanf("%lld", &k[i]), k[i]+=k[i-1];
    for(int i=2;i<=n;++i) sum_sum_k[i] = sum_sum_k[i-1] + k[i];
    build(1, n, 1);
    int m;scanf("%d", &m);
    for(int i=1;i<=m;++i)
    {
        int x, y; char s[2];
        scanf("%s%d%d", s, &x, &y);
        if(s[0]=='s')
            printf("%lld\n", query_sum(x, y, 1, n, 1)+sum_sum_k[y]-sum_sum_k[x-1]);
        else
        {
            int R = -1, tmp = query_sum(x, x, 1, n, 1) + y;
            if( mx[1] < tmp ) R = n;
            else R = query_mx(tmp, 1, n, 1) - 1;
            //error(x, R, tmp);
            update(x, R, tmp, 1, n, 1);
        }
    }
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define db double
#define all(x) x.begin(), x.end()
#define SZ(x) (int)(x.size())
#define mem(x, y) memset(x, y, sizeof(x))
#define what_is(x) cerr <<  "Line " << __LINE__ << ": " << #x << " is " << (x) << endl;
#define suf_zero(x) __builtin_ffs(x)
#define pre_zero(x) __builtin_clz(x)
#define num_one(x) __builtin_popcount(x)
#define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }
#define mt make_tuple
#define mp make_pair
#define eb emplace_back
#define INFI 2000000009
#define INFLL (ll)1e18+7
#define ig ignore
#define fi first
#define TP tuple<int, int, int>
#define se second
#define lson l, mid, rt<<1
#define rson mid+1, r, rt<<1|1
#define PII pair<int, int>
#define rep(i, begin, end) for(__typeof(end) i =(begin)-((begin)>(end));i!=(end)-((begin)>(end));i+=1-2*((begin)>(end)))
void err(istream_iterator<string> it) {cerr<<endl;}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
	cerr << *it << " = " << a << " , ";
	err(++it, args...);
}// fast IO
namespace fastIO{
    #define BUF_SIZE 100000
//     fread -> read
    bool IOerror = 0;
    inline char nc(){
        static char buf[BUF_SIZE], *p1 = buf+BUF_SIZE,
         *pend = buf+BUF_SIZE;
         if(p1==pend){
             p1 = buf;
             pend = buf+fread(buf, 1, BUF_SIZE, stdin);
             if(pend==p1){
                 IOerror = 1;
                 return -1;
             }
         }
         return *p1++;
    }
    inline bool blank(char ch){return ch==' '||ch=='\n'||ch=='\r'||ch=='\t';}
    inline void read(int &x){
        char ch;
        while(blank(ch=nc()));
        if(IOerror)return ;
        for(x=ch-'0';(ch=nc())>='0'&&ch<='9';x=x*10+ch-'0');
    }
    #undef BUF_SIZE
}
using namespace fastIO;
//#include<ext/pb_ds/assoc_container.hpp>
//#include<ext/pb_ds/hash_policy.hpp>
//using namespace __gnu_pbds;
const double PI = acos(-1.0);
const double eps = 1e-8;
const ll mod = 1e9+7;
ll qp(ll b, ll n){ll r=1;if(n<0)n+=mod-1;b%=mod;for(;n;n>>=1,b=b*b%mod)if(n&1)r=r*b%mod;return r;}
int sgn(double x){if(x<-eps)return -1;return x>eps?1:0;}
/////////////// Macro ///////////////
const int maxn = 1e6+7;
ll sum[maxn<<2], k[maxn], mx[maxn<<2], st[maxn<<2], a[maxn];
void pushup(int rt){sum[rt]=sum[rt<<1]+sum[rt<<1|1];mx[rt]=max(mx[rt<<1], mx[rt<<1|1]);}
void pushdown(int rt, int len)
{
    if(st[rt]==-INFLL)return;
    st[rt<<1] = st[rt<<1|1] = mx[rt<<1] = mx[rt<<1|1] = st[rt];
    sum[rt<<1] = st[rt] * ((len+1)/2);
    sum[rt<<1|1] = st[rt] * (len/2);
    st[rt]=-INFLL;
}
void build(int l, int r, int rt)
{
    st[rt]=-INFLL;
    if(l==r) {sum[rt]=a[l]-k[l];mx[rt]=sum[rt];return;}
    int mid = l+r>>1;
    build(lson);build(rson);
    pushup(rt);
}
void update(int L, int R, ll x, int l, int r, int rt)
{
    if(L<=l&&r<=R) {sum[rt]=x*(r-l+1);mx[rt]=x;st[rt]=x;return;}
    int mid = l+r>>1;pushdown(rt, r-l+1);
    if(L<=mid) update(L, R, x, lson);
    if(mid<R) update(L, R, x, rson);
    pushup(rt);
}
ll query_sum(int L, int R, int l, int r, int rt)
{
    if(L<=l&&r<=R) return sum[rt];
    int mid = l+r>>1;pushdown(rt, r-l+1);
    ll res = 0;
    if(L<=mid) res = query_sum(L, R, lson);
    if(mid <R) res += query_sum(L, R, rson);
    return res;
}
ll query_mx(ll x, int l, int r, int rt)
{
    if(l==r) return l;
    int mid = l+r>>1; pushdown(rt, r-l+1);
    if(mx[rt<<1]>=x) return query_mx(x, lson);
    else return query_mx(x, rson);
}
ll sum_sum_k[maxn];
int main()
{
    int n;scanf("%d", &n);
    for(int i=1;i<=n;++i) scanf("%lld", &a[i]);
    for(int i=2;i<=n;++i) scanf("%lld", &k[i]), k[i]+=k[i-1];
    for(int i=2;i<=n;++i) sum_sum_k[i] = sum_sum_k[i-1] + k[i];
    //for(int i=1;i<=n;++i) cout<<a[i]-k[i]<<' ';cout<<endl;
    build(1, n, 1);
    int m;scanf("%d", &m);
    for(int i=1;i<=m;++i)
    {
        int x, y; char s[2];
        scanf("%s%d%d", s, &x, &y);
        if(s[0]=='s'){
            // error(query_sum(x, y, 1, n, 1));
            printf("%lld\n", query_sum(x, y, 1, n, 1)+sum_sum_k[y]-sum_sum_k[x-1]);
        }
        else
        {
            int R = -1;
            ll tmp = query_sum(x, x, 1, n, 1) + y;
            if( mx[1] < tmp ) R = n;
            else R = query_mx(tmp, 1, n, 1) - 1;
            //error(x, R, tmp);
            update(x, R, tmp, 1, n, 1);
            //error(query_sum(6,6,1,n,1));
        }
    }
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define db double
#define all(x) x.begin(), x.end()
#define SZ(x) (int)(x.size())
#define mem(x, y) memset(x, y, sizeof(x))
#define what_is(x) cerr <<  "Line " << __LINE__ << ": " << #x << " is " << (x) << endl;
#define suf_zero(x) __builtin_ffs(x)
#define pre_zero(x) __builtin_clz(x)
#define num_one(x) __builtin_popcount(x)
#define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }
#define mt make_tuple
#define mp make_pair
#define eb emplace_back
#define INFI 2000000009
#define INFLL (ll)1e18+7
#define ig ignore
#define fi first
#define TP tuple<int, int, int>
#define se second
#define lson l, mid, rt<<1
#define rson mid+1, r, rt<<1|1
#define PII pair<int, int>
#define rep(i, begin, end) for(__typeof(end) i =(begin)-((begin)>(end));i!=(end)-((begin)>(end));i+=1-2*((begin)>(end)))
void err(istream_iterator<string> it) {cerr<<endl;}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
	cerr << *it << " = " << a << " , ";
	err(++it, args...);
}// fast IO
namespace fastIO{
    #define BUF_SIZE 100000
//     fread -> read
    bool IOerror = 0;
    inline char nc(){
        static char buf[BUF_SIZE], *p1 = buf+BUF_SIZE,
         *pend = buf+BUF_SIZE;
         if(p1==pend){
             p1 = buf;
             pend = buf+fread(buf, 1, BUF_SIZE, stdin);
             if(pend==p1){
                 IOerror = 1;
                 return -1;
             }
         }
         return *p1++;
    }
    inline bool blank(char ch){return ch==' '||ch=='\n'||ch=='\r'||ch=='\t';}
    inline void read(int &x){
        char ch;
        while(blank(ch=nc()));
        if(IOerror)return ;
        for(x=ch-'0';(ch=nc())>='0'&&ch<='9';x=x*10+ch-'0');
    }
    #undef BUF_SIZE
}
using namespace fastIO;
//#include<ext/pb_ds/assoc_container.hpp>
//#include<ext/pb_ds/hash_policy.hpp>
//using namespace __gnu_pbds;
const double PI = acos(-1.0);
const double eps = 1e-8;
const ll mod = 1e9+7;
ll qp(ll b, ll n){ll r=1;if(n<0)n+=mod-1;b%=mod;for(;n;n>>=1,b=b*b%mod)if(n&1)r=r*b%mod;return r;}
int sgn(double x){if(x<-eps)return -1;return x>eps?1:0;}
/////////////// Macro ///////////////
const int maxn = 1e6+7;
ll sum[maxn<<2], k[maxn], mx[maxn<<2], st[maxn<<2], a[maxn];
void pushup(int rt){sum[rt]=sum[rt<<1]+sum[rt<<1|1];mx[rt]=max(mx[rt<<1], mx[rt<<1|1]);}
void pushdown(int rt, int len)
{
    if(st[rt]==-INFI)return;
    st[rt<<1] = st[rt<<1|1] = mx[rt<<1] = mx[rt<<1|1] = st[rt];
    sum[rt<<1] = st[rt] * ((len+1)/2);
    sum[rt<<1|1] = st[rt] * (len/2);
    st[rt]=-INFI;
}
void build(int l, int r, int rt)
{
    st[rt]=-INFI;
    if(l==r) {sum[rt]=a[l]-k[l];mx[rt]=sum[rt];return;}
    int mid = l+r>>1;
    build(lson);build(rson);
    pushup(rt);
}
void update(int L, int R, ll x, int l, int r, int rt)
{
    if(L<=l&&r<=R) {sum[rt]=x*(r-l+1);mx[rt]=x;st[rt]=x;return;}
    int mid = l+r>>1;pushdown(rt, r-l+1);
    if(L<=mid) update(L, R, x, lson);
    if(mid<R) update(L, R, x, rson);
    pushup(rt);
}
ll query_sum(int L, int R, int l, int r, int rt)
{
    if(L<=l&&r<=R) return sum[rt];
    int mid = l+r>>1;pushdown(rt, r-l+1);
    ll res = 0;
    if(L<=mid) res = query_sum(L, R, lson);
    if(mid <R) res += query_sum(L, R, rson);
    return res;
}
ll query_mx(ll x, int l, int r, int rt)
{
    if(l==r) return l;
    int mid = l+r>>1; pushdown(rt, r-l+1);
    if(mx[rt<<1]>=x) return query_mx(x, lson);
    else return query_mx(x, rson);
}
ll sum_sum_k[maxn];
int main()
{
    int n;scanf("%d", &n);
    for(int i=1;i<=n;++i) scanf("%lld", &a[i]);
    for(int i=2;i<=n;++i) scanf("%lld", &k[i]), k[i]+=k[i-1];
    for(int i=2;i<=n;++i) sum_sum_k[i] = sum_sum_k[i-1] + k[i];
    //for(int i=1;i<=n;++i) cout<<a[i]-k[i]<<' ';cout<<endl;
    build(1, n, 1);
    int m;scanf("%d", &m);
    for(int i=1;i<=m;++i)
    {
        int x, y; char s[2];
        scanf("%s%d%d", s, &x, &y);
        if(s[0]=='s'){
            // error(query_sum(x, y, 1, n, 1));
            printf("%lld\n", query_sum(x, y, 1, n, 1)+sum_sum_k[y]-sum_sum_k[x-1]);
        }
        else
        {
            int R = -1, tmp = query_sum(x, x, 1, n, 1) + y;
            if( mx[1] < tmp ) R = n;
            else R = query_mx(tmp, 1, n, 1) - 1;
            //error(x, R, tmp);
            update(x, R, tmp, 1, n, 1);
            //error(query_sum(6,6,1,n,1));
        }
    }
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define db double
#define all(x) x.begin(), x.end()
#define SZ(x) (int)(x.size())
#define mem(x, y) memset(x, y, sizeof(x))
#define what_is(x) cerr <<  "Line " << __LINE__ << ": " << #x << " is " << (x) << endl;
#define suf_zero(x) __builtin_ffs(x)
#define pre_zero(x) __builtin_clz(x)
#define num_one(x) __builtin_popcount(x)
#define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }
#define mt make_tuple
#define mp make_pair
#define eb emplace_back
#define INFI 2000000009
#define INFLL (ll)1e18+7
#define ig ignore
#define fi first
#define TP tuple<int, int, int>
#define se second
#define lson l, mid, rt<<1
#define rson mid+1, r, rt<<1|1
#define PII pair<int, int>
#define rep(i, begin, end) for(__typeof(end) i =(begin)-((begin)>(end));i!=(end)-((begin)>(end));i+=1-2*((begin)>(end)))
void err(istream_iterator<string> it) {cerr<<endl;}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
	cerr << *it << " = " << a << " , ";
	err(++it, args...);
}// fast IO
namespace fastIO{
    #define BUF_SIZE 100000
//     fread -> read
    bool IOerror = 0;
    inline char nc(){
        static char buf[BUF_SIZE], *p1 = buf+BUF_SIZE,
         *pend = buf+BUF_SIZE;
         if(p1==pend){
             p1 = buf;
             pend = buf+fread(buf, 1, BUF_SIZE, stdin);
             if(pend==p1){
                 IOerror = 1;
                 return -1;
             }
         }
         return *p1++;
    }
    inline bool blank(char ch){return ch==' '||ch=='\n'||ch=='\r'||ch=='\t';}
    inline void read(int &x){
        char ch;
        while(blank(ch=nc()));
        if(IOerror)return ;
        for(x=ch-'0';(ch=nc())>='0'&&ch<='9';x=x*10+ch-'0');
    }
    #undef BUF_SIZE
}
using namespace fastIO;
//#include<ext/pb_ds/assoc_container.hpp>
//#include<ext/pb_ds/hash_policy.hpp>
//using namespace __gnu_pbds;
const double PI = acos(-1.0);
const double eps = 1e-8;
const ll mod = 1e9+7;
ll qp(ll b, ll n){ll r=1;if(n<0)n+=mod-1;b%=mod;for(;n;n>>=1,b=b*b%mod)if(n&1)r=r*b%mod;return r;}
int sgn(double x){if(x<-eps)return -1;return x>eps?1:0;}
/////////////// Macro ///////////////
const int maxn = 1e6+7;
ll sum[maxn<<2], k[maxn], mx[maxn<<2], st[maxn<<2], a[maxn];
void pushup(int rt){sum[rt]=sum[rt<<1]+sum[rt<<1|1];mx[rt]=max(mx[rt<<1], mx[rt<<1|1]);}
void pushdown(int rt, int len)
{
    if(st[rt]==-1)return;
    st[rt<<1] = st[rt<<1|1] = mx[rt<<1] = mx[rt<<1|1] = st[rt];
    sum[rt<<1] = st[rt] * ((len+1)/2);
    sum[rt<<1|1] = st[rt] * (len/2);
    st[rt]=-1;
}
void build(int l, int r, int rt)
{
    st[rt]=-1;
    if(l==r) {sum[rt]=a[l]-k[l];mx[rt]=sum[rt];return;}
    int mid = l+r>>1;
    build(lson);build(rson);
    pushup(rt);
}
void update(int L, int R, ll x, int l, int r, int rt)
{
    if(L<=l&&r<=R) {sum[rt]=x*(r-l+1);mx[rt]=x;st[rt]=x;return;}
    int mid = l+r>>1;pushdown(rt, r-l+1);
    if(L<=mid) update(L, R, x, lson);
    if(mid<R) update(L, R, x, rson);
    pushup(rt);
}
ll query_sum(int L, int R, int l, int r, int rt)
{
    if(L<=l&&r<=R) return sum[rt];
    int mid = l+r>>1;pushdown(rt, r-l+1);
    ll res = 0;
    if(L<=mid) res = query_sum(L, R, lson);
    if(mid <R) res += query_sum(L, R, rson);
    return res;
}
ll query_mx(ll x, int l, int r, int rt)
{
    if(l==r) return l;
    int mid = l+r>>1; pushdown(rt, r-l+1);
    if(mx[rt<<1]>=x) return query_mx(x, lson);
    else return query_mx(x, rson);
}
ll sum_sum_k[maxn];
int main()
{
    int n;scanf("%d", &n);
    for(int i=1;i<=n;++i) scanf("%lld", &a[i]);
    for(int i=2;i<=n;++i) scanf("%lld", &k[i]), k[i]+=k[i-1];
    for(int i=2;i<=n;++i) sum_sum_k[i] = sum_sum_k[i-1] + k[i];
    //for(int i=1;i<=n;++i) cout<<a[i]-k[i]<<' ';cout<<endl;
    build(1, n, 1);
    int m;scanf("%d", &m);
    for(int i=1;i<=m;++i)
    {
        int x, y; char s[2];
        scanf("%s%d%d", s, &x, &y);
        if(s[0]=='s'){
            // error(query_sum(x, y, 1, n, 1));
            printf("%lld\n", query_sum(x, y, 1, n, 1)+sum_sum_k[y]-sum_sum_k[x-1]);
        }
        else
        {
            int R = -1, tmp = query_sum(x, x, 1, n, 1) + y;
            if( mx[1] < tmp ) R = n;
            else R = query_mx(tmp, 1, n, 1) - 1;
            //error(x, R, tmp);
            update(x, R, tmp, 1, n, 1);
            //error(query_sum(6,6,1,n,1));
        }
    }
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define db double
#define all(x) x.begin(), x.end()
#define SZ(x) (int)(x.size())
#define mem(x, y) memset(x, y, sizeof(x))
#define what_is(x) cerr <<  "Line " << __LINE__ << ": " << #x << " is " << (x) << endl;
#define suf_zero(x) __builtin_ffs(x)
#define pre_zero(x) __builtin_clz(x)
#define num_one(x) __builtin_popcount(x)
#define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }
#define mt make_tuple
#define mp make_pair
#define eb emplace_back
#define INFI 2000000009
#define INFLL (ll)1e18+7
#define ig ignore
#define fi first
#define TP tuple<int, int, int>
#define se second
#define lson l, mid, rt<<1
#define rson mid+1, r, rt<<1|1
#define PII pair<int, int>
#define rep(i, begin, end) for(__typeof(end) i =(begin)-((begin)>(end));i!=(end)-((begin)>(end));i+=1-2*((begin)>(end)))
void err(istream_iterator<string> it) {cerr<<endl;}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
	cerr << *it << " = " << a << " , ";
	err(++it, args...);
}// fast IO
namespace fastIO{
    #define BUF_SIZE 100000
//     fread -> read
    bool IOerror = 0;
    inline char nc(){
        static char buf[BUF_SIZE], *p1 = buf+BUF_SIZE,
         *pend = buf+BUF_SIZE;
         if(p1==pend){
             p1 = buf;
             pend = buf+fread(buf, 1, BUF_SIZE, stdin);
             if(pend==p1){
                 IOerror = 1;
                 return -1;
             }
         }
         return *p1++;
    }
    inline bool blank(char ch){return ch==' '||ch=='\n'||ch=='\r'||ch=='\t';}
    inline void read(int &x){
        char ch;
        while(blank(ch=nc()));
        if(IOerror)return ;
        for(x=ch-'0';(ch=nc())>='0'&&ch<='9';x=x*10+ch-'0');
    }
    #undef BUF_SIZE
}
using namespace fastIO;
//#include<ext/pb_ds/assoc_container.hpp>
//#include<ext/pb_ds/hash_policy.hpp>
//using namespace __gnu_pbds;
const double PI = acos(-1.0);
const double eps = 1e-8;
const ll mod = 1e9+7;
ll qp(ll b, ll n){ll r=1;if(n<0)n+=mod-1;b%=mod;for(;n;n>>=1,b=b*b%mod)if(n&1)r=r*b%mod;return r;}
int sgn(double x){if(x<-eps)return -1;return x>eps?1:0;}
/////////////// Macro ///////////////
const int maxn = 1e6+7;
ll sum[maxn<<2], k[maxn], mx[maxn<<2], st[maxn<<2], a[maxn];
void pushup(int rt){sum[rt]=sum[rt<<1]+sum[rt<<1|1];mx[rt]=max(mx[rt<<1], mx[rt<<1|1]);}
void pushdown(int rt, int len)
{
    if(st[rt]==0)return;
    st[rt<<1] = st[rt<<1|1] = mx[rt<<1] = mx[rt<<1|1] = st[rt];
    sum[rt<<1] = st[rt] * ((len+1)/2);
    sum[rt<<1|1] = st[rt] * (len/2);
    st[rt]=0;
}
void build(int l, int r, int rt)
{
    st[rt]=0;
    if(l==r) {sum[rt]=a[l]-k[l];mx[rt]=sum[rt];return;}
    int mid = l+r>>1;
    build(lson);build(rson);
    pushup(rt);
}
void update(int L, int R, ll x, int l, int r, int rt)
{
    if(L<=l&&r<=R) {sum[rt]=x*(r-l+1);mx[rt]=x;st[rt]=x;return;}
    int mid = l+r>>1;pushdown(rt, r-l+1);
    if(L<=mid) update(L, R, x, lson);
    if(mid<R) update(L, R, x, rson);
    pushup(rt);
}
ll query_sum(int L, int R, int l, int r, int rt)
{
    if(L<=l&&r<=R) return sum[rt];
    int mid = l+r>>1;pushdown(rt, r-l+1);
    ll res = 0;
    if(L<=mid) res = query_sum(L, R, lson);
    if(mid <R) res += query_sum(L, R, rson);
    return res;
}
ll query_mx(ll x, int l, int r, int rt)
{
    if(l==r) return l;
    int mid = l+r>>1; pushdown(rt, r-l+1);
    if(mx[rt<<1]>=x) return query_mx(x, lson);
    else return query_mx(x, rson);
}
ll sum_sum_k[maxn];
int main()
{
    int n;scanf("%d", &n);
    for(int i=1;i<=n;++i) scanf("%lld", &a[i]);
    for(int i=2;i<=n;++i) scanf("%lld", &k[i]), k[i]+=k[i-1];
    for(int i=2;i<=n;++i) sum_sum_k[i] = sum_sum_k[i-1] + k[i];
    build(1, n, 1);
    int m;scanf("%d", &m);
    for(int i=1;i<=m;++i)
    {
        int x, y; char s[2];
        scanf("%s%d%d", s, &x, &y);
        if(s[0]=='s')
            printf("%lld\n", query_sum(x, y, 1, n, 1)+sum_sum_k[y]-sum_sum_k[x-1]);
        else
        {
            int R = -1, tmp = query_sum(x, x, 1, n, 1) + y;
            if( mx[1] < tmp ) R = n;
            else R = query_mx(tmp, 1, n, 1) - 1;
            //error(x, R, tmp);
            update(x, R, tmp, 1, n, 1);
        }
    }
}


#include<bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i=a;i<=b;i++)
#define lson rt<<1
#define rson rt<<1|1
typedef long long ll;
const int MAXN=1e5+10;
const ll INF=0x3f3f3f3f3f3f3f3f;
int a[MAXN],k[MAXN];
ll t[MAXN],sum[MAXN];
ll tree[MAXN<<2];
ll lazy[MAXN<<2];
void push_up(int rt){
    tree[rt]=tree[lson]+tree[rson];
}
void push_down(int l,int r,int rt){
    if(lazy[rt]!=INF){
        int mid=(l+r)>>1;
        lazy[lson]=lazy[rt];
        tree[lson]=1LL*(mid-l+1)*lazy[rt];
        lazy[rson]=lazy[rt];
        tree[rson]=1LL*(r-(mid+1)+1)*lazy[rt];
        lazy[rt]=INF;
    }
}
void build(int l,int r,int rt){
    lazy[rt]=INF;
    if(l==r){
        tree[rt]=a[l]-t[l-1];
        return;
    }
    int mid=(l+r)>>1;
    build(l,mid,lson);
    build(mid+1,r,rson);
    push_up(rt);
}
void update(int L,int R,ll val,int l,int r,int rt){
    if(L<=l&&r<=R){
        tree[rt]=1LL*val*(r-l+1);
        lazy[rt]=val;
        return;
    }
    push_down(l,r,rt);
    int mid=(l+r)>>1;
    if(mid>=L){
        update(L,R,val,l,mid,lson);
    }
    if(mid+1<=R){
        update(L,R,val,mid+1,r,rson);
    }
    push_up(rt);
}
ll get_val(int pos,int l,int r,int rt){
    if(l==r){
        return tree[rt];
    }
    push_down(l,r,rt);
    int mid=(l+r)>>1;
    if(pos<=mid){
        return get_val(pos,l,mid,lson);
    }else{
        return get_val(pos,mid+1,r,rson);
    }
}
ll query(int L,int R,int l,int r,int rt){
    if(L<=l&&r<=R){
        return tree[rt];
    }
    push_down(l,r,rt);
    int mid=(l+r)>>1;
    ll res=0;
    if(mid>=L){
        res+=query(L,R,l,mid,lson);
    }
    if(mid+1<=R){
        res+=query(L,R,mid+1,r,rson);
    }
    return res;
}
int main(){
    int n;
    scanf("%d",&n);
    rep(i,1,n){
        scanf("%d",&a[i]);
    }
    rep(i,1,n-1){
        scanf("%d",&k[i]);
        t[i]=t[i-1]+k[i];
        sum[i]=sum[i-1]+t[i];
    }
    build(1,n,1);
    int q;
    scanf("%d",&q);
    while(q--){
        char op[5];
        int x,y;
        scanf("%s%d%d",op,&x,&y);
        if(op[0]=='s'){
            ll ans=query(x,y,1,n,1);
            //cout<<ans<<" ";
            if(y>=1){
                ans+=sum[y-1];
            }
            if(x>=2){
                ans-=sum[x-2];
            }
            printf("%lld\n",ans);
        }else{
            ll val=get_val(x,1,n,1);
            int l=x,r=n,rpos=x;
            while(l<=r){
                int mid=(l+r)>>1;
                if(val+y>get_val(mid,1,n,1)){
                    rpos=mid;
                    l=mid+1;
                }else{
                    r=mid-1;
                }
            }
            update(x,rpos,val+y,1,n,1);
        }
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i=a;i<=b;i++)
#define lson rt<<1
#define rson rt<<1|1
typedef long long ll;
const int MAXN=1e5+10;
const ll INF=0x3f3f3f3f3f3f3f3f;
int a[MAXN],k[MAXN];
ll t[MAXN],sum[MAXN];
ll tree[MAXN];
ll lazy[MAXN];
ll mx[MAXN];
void push_up(int rt){
    tree[rt]=tree[lson]+tree[rson];
}
void push_down(int l,int r,int rt){
    if(lazy[rt]!=INF){
        int mid=(l+r)>>1;
        lazy[lson]=lazy[rt];
        tree[lson]=1LL*(mid-l+1)*lazy[rt];
        lazy[rson]=lazy[rt];
        tree[rson]=1LL*(r-(mid+1)+1)*lazy[rt];
        lazy[rt]=INF;
    }
}
void build(int l,int r,int rt){
    lazy[rt]=INF;
    if(l==r){
        tree[rt]=a[l]-t[l-1];
        return;
    }
    int mid=(l+r)>>1;
    build(l,mid,lson);
    build(mid+1,r,rson);
    push_up(rt);
}
void update(int L,int R,ll val,int l,int r,int rt){
    if(L<=l&&r<=R){
        tree[rt]=1LL*val*(r-l+1);
        lazy[rt]=val;
        return;
    }
    push_down(l,r,rt);
    int mid=(l+r)>>1;
    if(mid>=L){
        update(L,R,val,l,mid,lson);
    }
    if(mid+1<=R){
        update(L,R,val,mid+1,r,rson);
    }
    push_up(rt);
}
ll get_val(int pos,int l,int r,int rt){
    if(l==r){
        return tree[rt];
    }
    push_down(l,r,rt);
    int mid=(l+r)>>1;
    if(pos<=mid){
        return get_val(pos,l,mid,lson);
    }else{
        return get_val(pos,mid+1,r,rson);
    }
}
ll query(int L,int R,int l,int r,int rt){
    if(L<=l&&r<=R){
        return tree[rt];
    }
    push_down(l,r,rt);
    int mid=(l+r)>>1;
    ll res=0;
    if(mid>=L){
        res+=query(L,R,l,mid,lson);
    }
    if(mid+1<=R){
        res+=query(L,R,mid+1,r,rson);
    }
    return res;
}
int main(){
    int n;
    scanf("%d",&n);
    rep(i,1,n){
        scanf("%d",&a[i]);
    }
    rep(i,1,n-1){
        scanf("%d",&k[i]);
        t[i]=t[i-1]+k[i];
        sum[i]=sum[i-1]+t[i];
    }
    build(1,n,1);
    int q;
    scanf("%d",&q);
    while(q--){
        char op[5];
        int x,y;
        scanf("%s%d%d",op,&x,&y);
        if(op[0]=='s'){
            ll ans=query(x,y,1,n,1);
            //cout<<ans<<" ";
            if(y>=1){
                ans+=sum[y-1];
            }
            if(x>=2){
                ans-=sum[x-2];
            }
            printf("%lld\n",ans);
        }else{
            ll val=get_val(x,1,n,1);
            int l=x,r=n,rpos=x;
            while(l<=r){
                int mid=(l+r)>>1;
                if(val+y>get_val(mid,1,n,1)){
                    rpos=mid;
                    l=mid+1;
                }else{
                    r=mid-1;
                }
            }
            update(x,rpos,val+y,1,n,1);
        }
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i=a;i<=b;i++)
#define lson rt<<1
#define rson rt<<1|1
typedef long long ll;
const int MAXN=1e5+10;
const ll INF=0x3f3f3f3f3f3f3f3f;
int a[MAXN],k[MAXN];
ll t[MAXN],sum[MAXN];
ll tree[MAXN];
ll lazy[MAXN];
ll mx[MAXN];
void push_up(int rt){
    tree[rt]=tree[lson]+tree[rson];
}
void push_down(int l,int r,int rt){
    if(lazy[rt]!=INF){
        int mid=(l+r)>>1;
        lazy[lson]=lazy[rt];
        tree[lson]=1LL*(mid-l+1)*lazy[rt];
        lazy[rson]=lazy[rt];
        tree[rson]=1LL*(r-(mid+1)+1)*lazy[rt];
        lazy[rt]=INF;
    }
}
void build(int l,int r,int rt){
    lazy[rt]=INF;
    if(l==r){
        tree[rt]=a[l]-t[l-1];
        return;
    }
    int mid=(l+r)>>1;
    build(l,mid,lson);
    build(mid+1,r,rson);
    push_up(rt);
}
void update(int L,int R,int val,int l,int r,int rt){
    if(L<=l&&r<=R){
        tree[rt]=1LL*val*(r-l+1);
        lazy[rt]=val;
        return;
    }
    push_down(l,r,rt);
    int mid=(l+r)>>1;
    if(mid>=L){
        update(L,R,val,l,mid,lson);
    }
    if(mid+1<=R){
        update(L,R,val,mid+1,r,rson);
    }
    push_up(rt);
}
ll get_val(int pos,int l,int r,int rt){
    if(l==r){
        return tree[rt];
    }
    push_down(l,r,rt);
    int mid=(l+r)>>1;
    if(pos<=mid){
        return get_val(pos,l,mid,lson);
    }else{
        return get_val(pos,mid+1,r,rson);
    }
}
ll query(int L,int R,int l,int r,int rt){
    if(L<=l&&r<=R){
        return tree[rt];
    }
    push_down(l,r,rt);
    int mid=(l+r)>>1;
    ll res=0;
    if(mid>=L){
        res+=query(L,R,l,mid,lson);
    }
    if(mid+1<=R){
        res+=query(L,R,mid+1,r,rson);
    }
    return res;
}
int main(){
    int n;
    scanf("%d",&n);
    rep(i,1,n){
        scanf("%d",&a[i]);
    }
    rep(i,1,n-1){
        scanf("%d",&k[i]);
        t[i]=t[i-1]+k[i];
        sum[i]=sum[i-1]+t[i];
    }
    build(1,n,1);
    int q;
    scanf("%d",&q);
    while(q--){
        char op[5];
        int x,y;
        scanf("%s%d%d",op,&x,&y);
        if(op[0]=='s'){
            ll ans=query(x,y,1,n,1);
            //cout<<ans<<" ";
            if(y>=1){
                ans+=sum[y-1];
            }
            if(x>=2){
                ans-=sum[x-2];
            }
            printf("%lld\n",ans);
        }else{
            ll val=get_val(x,1,n,1);
            int l=x,r=n,rpos=x;
            while(l<=r){
                int mid=(l+r)>>1;
                if(val+y>get_val(mid,1,n,1)){
                    rpos=mid;
                    l=mid+1;
                }else{
                    r=mid-1;
                }
            }
            update(x,rpos,val+y,1,n,1);
        }
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i=a;i<=b;i++)
#define lson rt<<1
#define rson rt<<1|1
typedef long long ll;
const int MAXN=1e5+10;
const ll INF=0x3fff3f3f3f3f3f3f;
int a[MAXN],k[MAXN];
ll t[MAXN],sum[MAXN];
ll tree[MAXN];
ll lazy[MAXN];
ll mx[MAXN];
void push_up(int rt){
    tree[rt]=tree[lson]+tree[rson];
}
void push_down(int l,int r,int rt){
    if(lazy[rt]!=INF){
        int mid=(l+r)>>1;
        lazy[lson]=lazy[rt];
        tree[lson]=1LL*(mid-l+1)*lazy[rt];
        lazy[rson]=lazy[rt];
        tree[rson]=1LL*(r-(mid+1)+1)*lazy[rt];
        lazy[rt]=INF;
    }
}
void build(int l,int r,int rt){
    lazy[rt]=INF;
    if(l==r){
        tree[rt]=a[l]-t[l-1];
        return;
    }
    int mid=(l+r)>>1;
    build(l,mid,lson);
    build(mid+1,r,rson);
    push_up(rt);
}
void update(int L,int R,ll val,int l,int r,int rt){
    if(L<=l&&r<=R){
        tree[rt]=1LL*val*(r-l+1);
        lazy[rt]=val;
        return;
    }
    push_down(l,r,rt);
    int mid=(l+r)>>1;
    if(mid>=L){
        update(L,R,val,l,mid,lson);
    }
    if(mid+1<=R){
        update(L,R,val,mid+1,r,rson);
    }
    push_up(rt);
}
ll get_val(int pos,int l,int r,int rt){
    if(l==r){
        return tree[rt];
    }
    push_down(l,r,rt);
    int mid=(l+r)>>1;
    if(pos<=mid){
        return get_val(pos,l,mid,lson);
    }else{
        return get_val(pos,mid+1,r,rson);
    }
}
ll query(int L,int R,int l,int r,int rt){
    if(L<=l&&r<=R){
        return tree[rt];
    }
    push_down(l,r,rt);
    int mid=(l+r)>>1;
    ll res=0;
    if(mid>=L){
        res+=query(L,R,l,mid,lson);
    }
    if(mid+1<=R){
        res+=query(L,R,mid+1,r,rson);
    }
    return res;
}
int main(){
    int n;
    scanf("%d",&n);
    rep(i,1,n){
        scanf("%d",&a[i]);
    }
    rep(i,1,n-1){
        scanf("%d",&k[i]);
        t[i]=t[i-1]+k[i];
        sum[i]=sum[i-1]+t[i];
    }
    build(1,n,1);
    int q;
    scanf("%d",&q);
    while(q--){
        char op[5];
        int x,y;
        scanf("%s%d%d",op,&x,&y);
        if(op[0]=='s'){
            ll ans=query(x,y,1,n,1);
            //cout<<ans<<" ";
            if(y>=1){
                ans+=sum[y-1];
            }
            if(x>=2){
                ans-=sum[x-2];
            }
            printf("%lld\n",ans);
        }else{
            ll val=get_val(x,1,n,1);
            int l=x,r=n,rpos=x;
            while(l<=r){
                int mid=(l+r)>>1;
                if(val+y>get_val(mid,1,n,1)){
                    rpos=mid;
                    l=mid+1;
                }else{
                    r=mid-1;
                }
            }
            update(x,rpos,val+y,1,n,1);
        }
    }
    return 0;
}


#include <bits/stdc++.h>
#define ll long long
#define mk std::make_pair
#define st first
#define nd second

const int MAX_N = 1e5;
int n, q;

ll a[MAX_N+3], b[MAX_N+3];
ll pref[MAX_N+3];
ll t[MAX_N+3];

ll prefpref[MAX_N+3];

struct Node{
    ll sum, max, lazy;
    Node(){
        sum = 0;
        max = -LLONG_MAX;
        lazy = -LLONG_MAX;
    }
};

const int base = 1<<19;
struct SegmentTree{
    Node t[2*base+5];
    SegmentTree(){
        1+1;
    }
    int find(ll x, int v, int low, int high){
        // pierwszy wiekszy badz rowny x
        if (low == high)
            return low;
        if (t[v*2].max >= x)
            return find(x, v*2, low, (low+high)/2);
        else
            return find(x, v*2+1, (low+high)/2+1, high);
    }
    void pushDown(int v, int low, int high){
        ll x = t[v].lazy;
        t[v].max = x;
        ll range = (high-low+1);
        t[v].sum = range * x;
        if (low != high){
            t[v*2].lazy = x;
            t[v*2+1].lazy = x;
        }
        t[v].lazy = -LLONG_MAX;
    }
    void update(int low, int high, int L, int R, int v, ll x){
        if (low > high || L > R)
            return;
        if (t[v].lazy != -LLONG_MAX)
            pushDown(v, low, high);
        if (low > R || high < L)
            return;
        if (low >= L && high <= R){
            t[v].lazy = x;
            pushDown(v, low, high);
            return;
        }
        int mid = (low + high)/2;
        update(low, mid, L, R, v*2, x);
        update(mid+1, high, L, R, v*2+1, x);
        t[v].sum = (t[v*2].sum + t[v*2+1].sum);
        t[v].max = std::max(t[v*2].max, t[v*2+1].max);
    }
    ll query(int low, int high, int L, int R, int v){
        if (low > high || L > R)
            return 0;
        if (t[v].lazy != -LLONG_MAX)
            pushDown(v, low, high);
        if (low > R || high < L)
            return 0;
        if (low >= L && high <= R)
            return t[v].sum;
        int mid = (low + high)/2;
        return query(low, mid, L, R, v*2) + query(mid+1, high, L, R, v*2+1);
    }
};

void input(){
    std::cin >> n;
    for (int i = 1; i <= n; i++)
        std::cin >> a[i];
    for (int i = 1; i <= n-1; i++)
        std::cin >> b[i];
    pref[1] = 0;
    for (int i = 2; i <= n; i++)
        pref[i] = (pref[i-1] + b[i-1]);
    for (int i = 1; i <= n; i++)
        t[i] = a[i] - pref[i];
    prefpref[0] = 0;
    for (int i = 1; i <= n; i++)
        prefpref[i] = prefpref[i-1] + pref[i];
}

SegmentTree tree;

int main(){
    std::ios_base::sync_with_stdio(0); std::cin.tie(NULL);
    input();
    for (int i = 1; i <= n; i++)
        tree.update(1, n, i, i, 1, t[i]);
    std::cin >> q;
    char c; ll x, y;
    while (q--){
        std::cin >> c >> x >> y;
        if (c == '+'){
            ll value = tree.query(1, n, x, x, 1);
            if (tree.t[1].max < value + y)
                tree.update(1, n, x, n, 1, value + y);
            else{
                int last = tree.find(value + y, 1, 1, n);
                tree.update(1, n, x, last-1, 1, value + y);
            }
        }
        else{
            ll sum1 = tree.query(1, n, x, y, 1);
            sum1 += (prefpref[y] - prefpref[x-1]);
            std::cout << sum1 << "\n";
        }
    }
}


#include <bits/stdc++.h>
#define ll long long
#define mk std::make_pair
#define st first
#define nd second

const int MAX_N = 1e5;
int n, q;

ll a[MAX_N+3], b[MAX_N+3];
ll pref[MAX_N+3];
ll t[MAX_N+3];

ll prefpref[MAX_N+3];

struct Node{
    ll sum, max, lazy;
    Node(){
        sum = 0;
        max = -LLONG_MAX;
        lazy = -1;
    }
};

const int base = 1<<19;
struct SegmentTree{
    Node t[2*base+5];
    SegmentTree(){
        1+1;
    }
    int find(ll x, int v, int low, int high){
        // pierwszy wiekszy badz rowny x
        if (low == high)
            return low;
        if (t[v*2].max >= x)
            return find(x, v*2, low, (low+high)/2);
        else
            return find(x, v*2+1, (low+high)/2+1, high);
    }
    void pushDown(int v, int low, int high){
        ll x = t[v].lazy;
        t[v].max = x;
        ll range = (high-low+1);
        t[v].sum = range * x;
        if (low != high){
            t[v*2].lazy = x;
            t[v*2+1].lazy = x;
        }
        t[v].lazy = -1;
    }
    void update(int low, int high, int L, int R, int v, ll x){
        if (low > high || L > R)
            return;
        if (t[v].lazy != -1)
            pushDown(v, low, high);
        if (low > R || high < L)
            return;
        if (low >= L && high <= R){
            t[v].lazy = x;
            pushDown(v, low, high);
            return;
        }
        int mid = (low + high)/2;
        update(low, mid, L, R, v*2, x);
        update(mid+1, high, L, R, v*2+1, x);
        t[v].sum = (t[v*2].sum + t[v*2+1].sum);
        t[v].max = std::max(t[v*2].max, t[v*2+1].max);
    }
    ll query(int low, int high, int L, int R, int v){
        if (low > high || L > R)
            return 0;
        if (t[v].lazy != -1)
            pushDown(v, low, high);
        if (low > R || high < L)
            return 0;
        if (low >= L && high <= R)
            return t[v].sum;
        int mid = (low + high)/2;
        return query(low, mid, L, R, v*2) + query(mid+1, high, L, R, v*2+1);
    }
};

void input(){
    std::cin >> n;
    for (int i = 1; i <= n; i++)
        std::cin >> a[i];
    for (int i = 1; i <= n-1; i++)
        std::cin >> b[i];
    pref[1] = 0;
    for (int i = 2; i <= n; i++)
        pref[i] = (pref[i-1] + b[i-1]);
    for (int i = 1; i <= n; i++)
        t[i] = a[i] - pref[i];
    prefpref[0] = 0;
    for (int i = 1; i <= n; i++)
        prefpref[i] = prefpref[i-1] + pref[i];
}

SegmentTree tree;

int main(){
    std::ios_base::sync_with_stdio(0); std::cin.tie(NULL);
    input();
    for (int i = 1; i <= n; i++)
        tree.update(1, n, i, i, 1, t[i]);
    std::cin >> q;
    char c; ll x, y;
    while (q--){
        std::cin >> c >> x >> y;
        if (c == '+'){
            ll value = tree.query(1, n, x, x, 1);
            if (tree.t[1].max < value + y)
                tree.update(1, n, x, n, 1, value + y);
            else{
                int last = tree.find(value + y, 1, 1, n);
                tree.update(1, n, x, last-1, 1, value + y);
            }
        }
        else{
            ll sum1 = tree.query(1, n, x, y, 1);
            sum1 += (prefpref[y] - prefpref[x-1]);
            std::cout << sum1 << "\n";
        }
    }
}