#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<=(int)(n);i++)
#define all(c) c.begin(),c.end()
#define pb push_back
#define fs first
#define sc second
#define show(x) cout << #x << " = " << x << endl
#define chmin(x,y) x=min(x,y)
#define chmax(x,y) x=max(x,y)
using namespace std;
template<class S,class T> ostream& operator<<(ostream& o,const pair<S,T> &p){return o<<"("<<p.fs<<","<<p.sc<<")";}
template<class T> ostream& operator<<(ostream& o,const vector<T> &vc){o<<"sz = "<<vc.size()<<endl<<"[";for(const T& v:vc) o<<v<<",";o<<"]";return o;}
using ll = long long;
using P = pair<ll,ll>;
int N,Q;
const int MN = 200010;
ll a[MN],b[MN];
set<P> stplus,stminus;
int main(){
	cin>>N>>Q;
	N*=2;
	rep(i,N) cin>>a[i];
	rep(i,N) cin>>b[i];

	ll suma = 0;
	ll sump = 0;

	rep(i,N){
		if(i==0 || i==N-1) continue;
		suma += a[i];
		if(b[i]-a[i]>=0){
			stplus.insert(P(b[i]-a[i],i));
			sump += b[i]-a[i];
		}else{
			stminus.insert(P(b[i]-a[i],i));
		}
	}
	rep(qt,Q){
		int i;
		ll x,y;
		cin>>i>>x>>y;
		i--;
		if(i==0 || i==N-1){
			a[i] = x;
			b[i] = y;
		}else{
			if(b[i]-a[i]>=0){
				stplus.erase(P(b[i]-a[i],i));
				sump -= b[i]-a[i];
			}else{
				stminus.erase(P(b[i]-a[i],i));
			}
			suma -= a[i];
			a[i] = x, b[i] = y;
			if(b[i]-a[i]>=0){
				stplus.insert(P(b[i]-a[i],i));
				sump += b[i]-a[i];
			}else{
				stminus.insert(P(b[i]-a[i],i));
			}
			suma += a[i];
		}

		if(stplus.size()%2 == 0){
			cout<<suma+sump+a[0]+a[N-1]<<endl;
		}else{
			ll tmp = max(- (stplus.begin()->fs) , stminus.rbegin()->fs);
			cout<<suma+sump+a[0]+a[N-1]+tmp<<endl;
		}
	}
	
}
