#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<complex>
#include<queue>
#include<deque>
#include<map>
#include<set>
#include<bitset>
using namespace std;
#define REP(i,m,n) for(int i=(int)m ; i < (int) n ; ++i )
#define rep(i,n) REP(i,0,n)
typedef long long ll;
typedef pair<int,int> pint;
typedef pair<ll,int> pli;
const int inf=1e9+7;
const ll longinf=1LL<<60 ;
const ll mod=1e9+7 ;
int dx[4]={1,0,-1,0} , dy[4]={0,1,0,-1} ;


int main(){
    int n,q;
    cin>>n>>q;
    n*=2;
    ll a[n],b[n];
    rep(i,n)cin>>a[i];
    rep(i,n)cin>>b[i];
    ll ans=a[0]+a[n-1];
    int posi=0,ze=0;
    multiset<ll> st;
    rep(i,n-2){
        ans+=max(a[i+1],b[i+1]);
        if(a[i+1]<b[i+1])posi++;
        st.insert(abs(a[i+1]-b[i+1]));
    }
    rep(i,q){
        ll p,x,y;
        cin>>p>>x>>y;
        p--;
        if(p==0||p==n-1)ans+=(ll)(x-a[p]);
        else{
        ans+=max(x,y);
        ans-=max(a[p],b[p]);
        auto it=st.find(abs(a[p]-b[p]));
        st.erase(it);
        st.insert(abs(x-y));
        if(a[p]<b[p])posi--;
        if(x<y)posi++;
        }
        a[p]=x;
        b[p]=y;
        if(posi%2==0)cout<<ans<<endl;
        else cout<<ans-*st.begin()<<endl;
    }
}