#include <bits/stdc++.h>
using namespace std;

typedef long long ll;

const int MAXN = 2e5 + 5;

int N, Q;
int a[MAXN], b[MAXN];
int diff[MAXN];
multiset <int> pos, neg;
ll sum;

void in(int x) {
	diff[x] = b[x] - a[x];
	sum += a[x];
	if (x == 1 || x == N)
		return;
	if (diff[x] < 0)
		neg.insert(diff[x]);
	else {
		pos.insert(diff[x]);
		sum += diff[x];
	}
}

void out(int x) {
	sum -= a[x];
	if (x == 1 || x == N)
		return;
	if (diff[x] < 0)
		neg.erase(neg.find(diff[x]));
	else {
		pos.erase(pos.find(diff[x]));
		sum -= diff[x];
	}
}

int main() {
	scanf("%d%d", &N, &Q);
	N *= 2;
	for (int i = 1; i <= N; i++)
		scanf("%d", a + i);
	for (int i = 1; i <= N; i++)
		scanf("%d", b + i);

	for (int i = 1; i <= N; i++) 
		in(i);
	
	while (Q--) {
		int p, x, y;
		scanf("%d%d%d", &p, &x, &y);
		out(p);
		a[p] = x;
		b[p] = y;
		in(p);
		printf("%lld\n", sum + (pos.size() % 2 ? max(-*pos.begin(), *neg.rbegin()) : 0));   
	}
	
	return 0;
}