#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<map>
#include<complex>
#define lol(i,n) for(int i=0;i<n;i++)
#define mod 1000000007
typedef long long ll;
using namespace std;
#define N 200010
ll n,q,a[N],b[N];
map<ll,ll> mp;
void Erase(ll x){
    mp[x]--;
    if(mp[x]==0)mp.erase(x);
}
int main(){
    cin>>n>>q;
    lol(i,2*n)cin>>a[i];
    lol(i,2*n)cin>>b[i];
    
    ll sum=a[0]+a[2*n-1];
    ll cnt=0;
    for(int i=1;i<=2*n-2;i++){
	sum+=max(a[i],b[i]);
	if(a[i]>b[i])cnt++;
	mp[abs(a[i]-b[i])]++;
    }
    
    lol(u,q){
	ll p,x,y;
	cin>>p>>x>>y;
	p--;
	if(p==0||p==2*n-1){
	    sum=sum-a[p]+x;
	}
	else{
	    sum-=max(a[p],b[p]);
	    sum+=max(x,y);
	    
	    if(a[p]>b[p])cnt--;
	    Erase(abs(a[p]-b[p]));
	    
	    if(x>y)cnt++;
	    else mp[abs(x-y)]++;
	}
	a[p]=x,b[p]=y;
	ll ans=sum;
	if(cnt%2==1){
	    ans-=mp.begin()->first;
	}
	cout<<ans<<endl;
    }
    return 0;
}
