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

const int N = 200005;

int n, q;
int a[N], b[N];
multiset < pair<long long, int> > sa, sb; // (b - a, p)
long long sum;

void reset() {
	while(sa.size() >= 2) {
		multiset < pair<long long, int> > :: iterator it;
		it = sa.end();
		--it;
		pair<long long, int> x = (*it);
		--it;
		pair<long long, int> y = (*it);

		if (x.first + y.first > 0) {
			sb.insert(x);
			sb.insert(y);
			sum -= a[x.second]; sum += b[x.second];
			sum -= a[y.second]; sum += b[y.second];

			sa.erase(sa.find(x));
			sa.erase(sa.find(y));
		}
		else break;
	}
}

void debug(multiset< pair<long long, int> > &s) {
	for (auto &e : s) printf("[%lld, %d] ", e.first, e.second); printf("\n");
}

int main() {
	ios_base::sync_with_stdio(false); cin.tie(0);

	cin >> n >> q;

	for (int i = 1; i <= 2 * n; ++i) cin >> a[i];
	for (int i = 1; i <= 2 * n; ++i) cin >> b[i];

	for (int i = 1; i <= 2 * n; ++i) {
		sum += a[i];
		if (i != 1 && i != 2 * n) {
			sa.insert(make_pair(b[i] - a[i], i));
		}
	}

	reset();

	while(q--) {
		int p, x, y; cin >> p >> x >> y;
		if (p != 1 && p != 2 * n) {
			if (sb.find(make_pair(b[p] - a[p], p)) != sb.end()) {
				sb.erase(sb.find(make_pair(b[p] - a[p], p)));
				sum -= b[p];
			}
			else if (sa.find(make_pair(b[p] - a[p], p)) != sa.end()) {
				sa.erase(sa.find(make_pair(b[p] - a[p], p)));
				sum -= a[p];
			}
		} else {
			sum -= a[p];
		}

		a[p] = x;
		b[p] = y;
		sum += a[p];

		if (p != 1 && p != 2 * n) sa.insert(make_pair(y - x, p));

		//printf("sa "); debug(sa);
		//printf("sb "); debug(sb);

		int ndel = 0;
		while(!sb.empty()) {
			if (ndel >= 2 && sb.size() % 2 == 0) break;
			++ndel;
			sum -= b[(*sb.begin()).second];
			sum += a[(*sb.begin()).second];
			sa.insert(*sb.begin());
			sb.erase(sb.begin());
		}

		reset();

		//printf("sa "); debug(sa);
		//printf("sb "); debug(sb);

		printf("%lld\n", sum);
	}
}