#include <bits/stdc++.h>

using namespace std;

typedef long long LL;
typedef pair<int , int> P2;
typedef pair<pair<int , int> , int> P3;
typedef pair<pair<int , int> , pair<int , int> > P4;
#define PB(a) push_back(a)
#define MP(a , b) make_pair((a) , (b))
#define M3P(a , b , c) make_pair(make_pair((a) , (b)) , (c))
#define M4P(a , b , c , d) make_pair(make_pair((a) , (b)) , make_pair((c) , (d)))
#define repp(i,a,b) for(int i = (int)(a) ; i < (int)(b) ; ++i)
#define repm(i,a,b) for(int i = (int)(a) ; i > (int)(b) ; --i)

const int MC = 200010;
int N,Q;
int a[MC] , b[MC];
set<P2> S,T;
LL ans;

int main(){
	cin >> N >> Q;
	repp(i,1,2*N+1) cin >> a[i];
	repp(i,1,2*N+1){
		cin >> b[i];
		ans += a[i];
		if(i==1 || i==2*N) continue;
		if(b[i]-a[i]>0){
			ans += b[i] - a[i];
			T.insert(MP(b[i]-a[i],i));
		} else {
			S.insert(MP(b[i]-a[i],i));
		}
	}
	repp(i,0,Q){
		int p,x,y;
		cin >> p >> x >> y;
		if(p == 1 || p == 2*N){
			ans += x - a[p];
		} else {
			if(b[p]-a[p]>0){
				T.erase(MP(b[p]-a[p],p));
				ans -= b[p];
			} else {
				S.erase(MP(b[p]-a[p],p));
				ans -= a[p];
			}
			if(y-x>0){
				T.insert(MP(y-x,p));
				ans += y;
			} else {
				S.insert(MP(y-x,p));
				ans += x;
			}
		}
		a[p] = x;
		b[p] = y;
		LL z = 0;
		if(T.size()%2){
			z = max(-(*T.begin()).first,(*S.rbegin()).first);
		}
		cout << ans + z << endl;
	}
	return 0;
}
