#include<bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
typedef long long LL;

int N,Q;
LL a[200001];
LL b[200001];
bool update[200001];

typedef pair<LL,int>P;
priority_queue<LL>que;
priority_queue<LL,vector<LL>,greater<LL> >que2;
map<LL,int>m;
map<LL,int>m2;

int main(){
    cin>>N>>Q;
    REP(i,2*N){
        cin>>a[i];
    }
    REP(i,2*N){
        cin>>b[i];
    }
    REP(i,2*N){
        if((i==0)||(i==(2*N-1)))continue;
        //update[i]=false;
        que.push(b[i]-a[i]);
        m[(b[i]-a[i])]++;
    }
    LL ans=0;
    REP(i,2*N){
        ans+=a[i];
    }
    REP(i,N-1){
        LL t1=que.top();que.pop();
        LL t2=que.top();que.pop();
        if(t1+t2>=0){
           que2.push(t1);
           que2.push(t2);
           m2[t1]++;
           m2[t2]++;
           m[t1]--;
           m[t2]--;
           ans+=(t1+t2);
        }else{
           que.push(t1);
           que.push(t2);
        }
    }
    //cout<<ans<<endl;
    
    REP(i,Q){
        int p;
        LL x,y;
        cin>>p>>x>>y;
        p--;
        if((p==0)||(p==2*N-1)){
            ans-=a[p];
            ans+=x;
            a[p]=x;
            cout<<ans<<endl;
            continue;
        }
        
        LL t=b[p]-a[p];
      //  cout<<"p"<<p<<" "<<t<<" "<<m[t]<<" "<<m2[t]<<endl;
        if((m[t]==0)||((t<=0)&&(m2[t]>=1))){
     //      cout<<"aaa"<<endl;
           m2[t]--;
           ans-=t;
           LL u=que2.top();que2.pop();
           while(m2[u]==0){
              u=que2.top();que2.pop();
           }
           m2[u]--;
           que.push(u);
           ans-=u;
           m[u]++;
        }else{
       //    cout<<"bbbb"<<endl;
           m[t]--;
           if(!que2.empty()){
               LL t1=que2.top();que2.pop();
               bool c=false;
               while(m2[t1]==0){
                  if(que2.empty()){
                     c=true;
                     break;
                  }
                  t1=que2.top();que2.pop();
               }
               m2[t1]--;
               LL t2=que2.top();que2.pop();
               while(m2[t2]==0){
                  if(que2.empty()){
                     c=true;
                     break;
                  }
                  t2=que2.top();que2.pop();
               }
               m2[t2]--;
               if(c==false){
                  ans-=t1;
                  ans-=t2;
                  que.push(t1);
                  que.push(t2);
                  m[t1]++;
                  m[t2]++;
               }
           }
           
        }
        ans-=a[p];
        ans+=x;
        a[p]=x;
        b[p]=y;
        que.push(y-x);
        m[y-x]++;
        //cout<<que.size()<<endl;
        REP(i,2){
          //  cout<<"me"<<endl;
            if(que.empty())break;
            LL t1=que.top();que.pop();
            bool c=false;
            while(m[t1]==0){
               if(que.empty()){
                  c=true;
                  break;
               }
               t1=que.top();que.pop();
            }
            m[t1]--;
            LL t2=que.top();que.pop();
            while(m[t2]==0){
               if(que.empty()){
                  c=true;
                  break;
               }
               t2=que.top();que.pop();
            }
            m[t2]--;
            if(c)break;
            
            if(t1+t2>=0){
              que2.push(t1);
              que2.push(t2);
              m2[t1]++;
              m2[t2]++;
              ans+=(t1+t2);
           }else{
              que.push(t1);
              que.push(t2);
              m[t1]++;
              m[t2]++;
           }
        }
        cout<<ans<<endl;
    }

    
    return(0);
}