#include<set>
#include<iostream>
#define rep(i,a,b)for(int i=a;i<b;++i)
typedef long long ll;
using namespace std;
int N,Q;
ll A[200001],B[200001];
multiset<ll>S;

int main(){
	ios::sync_with_stdio(0);
	cin>>N>>Q;
	rep(i,0,N<<1)cin>>A[i];
	rep(i,0,N<<1)cin>>B[i];
	ll ans=0;
	bool odd=0;
	ans+=A[0]+A[(n<<1)-1];
	rep(i,1,(N<<1)-1){
		ans+=max(A[i],B[i]);
		odd^=(A[i]>B[i]);
		S.insert(abs(A[i]-B[i]));
	}
	while(Q--){
		ll a,x,y;
		cin>>a>>x>>y;
		if(--a==0||a==(N<<1)-1){
			ans+=x-A[a];
			A[a]=x;
		}else{
			odd^=(A[a]>B[a]);
			odd^=(x>y);
			ans+=max(x, y)-max(A[a],B[a]);
			int*p=S.lower_bound(abs(A[a]-B[a]));
			S.erase();
			S.insert(abs(x-y));
			A[a]=x;
			B[a]=y;
		}
		cout<<(!odd?ans:ans-(*S.begin()))<<"\n";
	}
	return 0;
}