#include <iostream>
#include <string>
#include <vector>
#include <set>
#include <algorithm>
#include <utility>

using namespace std;
using ll = long long;
using pii = pair<ll, ll>;

int main(){
	ios_base::sync_with_stdio(false);
	int n, q;
	cin >> n >> q;
	n *= 2;
	vector<int> a(n), b(n);
	for(int i = 0; i < n; ++i){ cin >> a[i]; }
	for(int i = 0; i < n; ++i){ cin >> b[i]; }
	set<pii> eq, ne;
	ll base = 0, sum = 0;
	for(int i = 0; i < n; ++i){
		const int d = a[i] - b[i];
		base += b[i];
		if(i == 0 || i + 1 == n){
			sum += d;
		}else if(d > 0){
			eq.emplace(d, i);
			sum += d;
		}else{
			ne.emplace(d, i);
		}
	}
	while(q--){
		int p, x, y;
		cin >> p >> x >> y;
		--p;
		if(p == 0 || p + 1 == n){
			const int before_d = a[p] - b[p];
			const int after_d = x - y;
			base -= b[p];
			base += y;
			a[p] = x; b[p] = y;
			sum -= before_d;
			sum += after_d;
		}else{
			const int before_d = a[p] - b[p];
			const int after_d = x - y;
			const auto eq_it = eq.find(pii(before_d, p));
			const auto ne_it = ne.find(pii(before_d, p));
			if(eq_it != eq.end()){
				sum -= before_d;
				eq.erase(eq_it);
			}else{
				ne.erase(ne_it);
			}
			base -= b[p];
			base += y;
			a[p] = x; b[p] = y;
			if(after_d > 0){
				sum += after_d;
				eq.emplace(after_d, p);
			}else{
				ne.emplace(after_d, p);
			}
		}	
		if(eq.size() % 2 != 0){
			const auto x = *(eq.begin());
			const auto y = *(ne.rbegin());
			if(x.first >= -y.first){
				ne.erase(y);
				eq.insert(y);
				sum += y.first;
			}else{
				eq.erase(x);
				ne.insert(x);
				sum -= x.first;
			}
		}
		cout << base + sum << endl;
	}
	return 0;
}

