#include <queue>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
	cin.tie(0);
	ios_base::sync_with_stdio(false);
	int N, Q;
	cin >> N >> Q;
	vector<int> A(2 * N), B(2 * N);
	for (int i = 0; i < 2 * N; ++i) cin >> A[i];
	for (int i = 0; i < 2 * N; ++i) cin >> B[i];
	long long sum = 0;
	vector<int> diff(2 * N);
	int bcnt = 0;
	for (int i = 0; i < 2 * N; ++i) {
		if (i == 0 || i == 2 * N - 1) {
			sum += A[i];
		}
		else {
			sum += max(A[i], B[i]);
			diff[i] = abs(A[i] - B[i]);
			if (A[i] < B[i]) bcnt ^= 1;
		}
	}
	priority_queue<pair<int, int> > que;
	for (int i = 1; i < 2 * N - 1; ++i) {
		que.push(make_pair(-diff[i], i));
	}
	for (int i = 0; i < Q; ++i) {
		int P, X, Y;
		cin >> P >> X >> Y; --P;
		if (P == 0 || P == 2 * N - 1) {
			sum -= A[P];
			A[P] = X;
			B[P] = Y;
			sum += A[P];
		}
		else {
			sum -= max(A[P], B[P]);
			if (A[P] < B[P]) bcnt ^= 1;
			A[P] = X;
			B[P] = Y;
			diff[P] = abs(A[P] - B[P]);
			sum += max(A[P], B[P]);
			if (A[P] < B[P]) bcnt ^= 1;
			que.push(make_pair(-diff[P], P));
		}
		long long ans = sum;
		if (bcnt == 1) {
			while (diff[que.top().second] != -que.top().first) {
				que.pop();
			}
			ans += que.top().first;
		}
		cout << ans << '\n';
	}
	return 0;
}