#include <iostream>
#include <vector>
#include <queue>
#include <algorithm>

using namespace std;

int main(){
	int N, Q;
	while(cin >> N >> Q){
		long long res = 0;
		vector<long long> a(2*N), dif(2*N);
		for(auto& t : a) cin >> t;
		for(int i=0;i<2*N;i++){
			res += a[i];
			cin >> dif[i];
			dif[i] -= a[i];
		}
		vector<pair<long long, int>> v;
		for(int i=1;i<2*N-1;i++){
			v.emplace_back(dif[i], i);
		}
		sort(v.rbegin(), v.rend());
		using Data = pair<long long, pair<int,int>>;
		priority_queue<Data> no_use;
		priority_queue<Data, vector<Data>, greater<Data>> use;
		vector<int> type(2*N, 0);
		vector<int> update(2*N, -1);
		vector<int> typeCnt(2, 0);
		typeCnt[0] = 2*N-2;
		for(int i=0;i+1<v.size();i+=2){
			if(v[i].first + v[i+1].first >= 0){
				res += v[i].first + v[i+1].first;
				type[v[i].second] = 1;
				type[v[i+1].second] = 1;
				typeCnt[0] -= 2;
				typeCnt[1] += 2;
			}
		}
		for(int i=1;i<2*N-1;i++){
			if(type[i]==0) no_use.emplace(dif[i], make_pair(i, -1));
			if(type[i]==1) use.emplace(dif[i], make_pair(i, -1));
		}
		auto removeOld = [&](auto& qu, int useType){
			while(!qu.empty()){
				auto data = qu.top();
				auto idx = data.second.first;
				if(type[idx] == useType && update[idx] == data.second.second) break;
				qu.pop();
			}
		};
		auto removeOldUse = [&](){ removeOld(use, 1); };
		auto removeOldNoUse = [&](){ removeOld(no_use, 0); };
		for(int i=0;i<Q;i++){
			long long p, x, y; cin >> p >> x >> y;
			--p;
			res += x - a[p];
			if(0 < p && p < 2*N-1){
				if(type[p] == 1){
					res += y - x - dif[p];
					use.emplace(y-x, make_pair(p, i));
				} else {
					no_use.emplace(y-x, make_pair(p, i));
				}
			}
			// cout << "chg" <<  i << ":" << res << endl;
			// cout << typeCnt[0] << " " << typeCnt[1] << endl;
			// cout << use.size() << " " << no_use.size() << endl;
			a[p] = x;
			dif[p] = y - x;
			update[p] = i;
			if(0 < p && p < 2*N-1){
				removeOldUse();
				removeOldNoUse();
				if(typeCnt[0] > 0 && typeCnt[1] > 0 && use.top().first < no_use.top().first){
					auto d1 = use.top(); use.pop();
					auto d2 = no_use.top(); no_use.pop();
					res += d2.first - d1.first;
					use.push(d2);
					no_use.push(d1);
					type[d2.second.first] = 1;
					type[d1.second.first] = 0;
					// cout << "swap" <<  i << ":" << res << endl;
				}
				if(typeCnt[1] > 0){
					removeOldUse();
					auto d1 = use.top(); use.pop();
					removeOldUse();
					auto d2 = use.top(); use.pop();
					if(d1.first + d2.first < 0){
						res -= d1.first + d2.first;
						// cout << "remove" <<  i << ":" << res << endl;
						type[d1.second.first] = 0;
						type[d2.second.first] = 0;
						typeCnt[0] += 2;
						typeCnt[1] -= 2;
						no_use.emplace(d1);
						no_use.emplace(d2);
					} else {
						use.emplace(d1);
						use.emplace(d2);
					}
				}
				if(typeCnt[0] > 0){
					removeOldNoUse();
					auto d1 = no_use.top(); no_use.pop();
					removeOldNoUse();
					auto d2 = no_use.top(); no_use.pop();
					if(d1.first + d2.first >= 0){
						res += d1.first + d2.first;
						// cout << "add" <<  i << ":" << res << endl;
						type[d1.second.first] = 1;
						type[d2.second.first] = 1;
						typeCnt[0] -= 2;
						typeCnt[1] += 2;
						use.emplace(d1);
						use.emplace(d2);
					} else {
						no_use.emplace(d1);
						no_use.emplace(d2);
					}
				}
				/*
				if(type[p] == 1){
					removeOld(use);
					auto data = use.top();
					if(data.first + y - x < 0){
						cout << "A" << endl;
						res -= data.first + dif[p];
						use.pop();
						no_use.push(data);
						no_use.emplace(y-x, make_pair(p, i));
						type[data.second.first] = 0;
						type[p] = 0;
					} else {
						cout << "B" << endl;
						res += y - x - dif[p];
						use.emplace(y-x, make_pair(p, i));
					}
				} else {
					removeOld(no_use);
					auto data = no_use.top();
					if(data.first + y - x >= 0){
						cout << "C" << " " << data.first + y - x << endl;
						res += data.first + y - x;
						no_use.pop();
						use.push(data);
						use.emplace(y-x, make_pair(p, i));
						type[data.second.first] = 1;
						type[p] = 1;
					} else {
						cout << "D" << endl;
						no_use.emplace(y-x, make_pair(p, i));
					}
				}
				*/			
			}
			a[p] = x;
			dif[p] = y - x;
			update[p] = i;
			cout << res << endl;
		}
	}
}


Measured memory_bytes: 21356