#include<bits/stdc++.h>

using namespace std;
typedef long long LL;

#ifdef BTK
#define DEBUG if(1)
#else
#define CIN_ONLY if(1)
struct cww {cww() {CIN_ONLY{ios::sync_with_stdio(false); cin.tie(0);}}
}star;
#define DEBUG if(0)
#endif

#define ALL(v) (v).begin(),(v).end()
#define REC(ret, ...) std::function<ret (__VA_ARGS__)>
template <typename T>inline bool chmin(T &l, T r){bool a = l>r; if (a)l = r; return a;}
template <typename T>inline bool chmax(T &l, T r){bool a = l<r; if (a)l = r; return a;}
template <typename T>istream& operator>>(istream &is, vector<T> &v){for (auto &it : v)is >> it;return is;}

class range {private: struct I { int x; int operator*() { return x; }bool operator!=(I& lhs) { return x<lhs.x; }void operator++() { ++x; } }; I i, n;public:range(int n) :i({ 0 }), n({ n }) {}range(int i, int n) :i({ i }), n({ n }) {}I& begin() { return i; }I& end() { return n; }};

set<pair<LL, int>> pl, mi;
int N, Q;
LL sum = 0;
LL a[212345];
LL b[212345];
void ins(int i) {
	if (i == 0 || i == N - 1)return;
	LL x = b[i] - a[i];
	if (x >= 0) {
		pl.insert({ x,i });
		sum += x;
	}
	else mi.insert({ x,i });
}
void ers(int i){
	if (i == 0 || i == N - 1)return;
	LL x = b[i] - a[i];
	if (x >= 0) {
		pl.erase({ x,i });
		sum -= x;
	}
	else mi.erase({ x,i });
}

int main() {
	cin >> N >> Q;
	N *= 2;
	for (int i : range(N)) {
		cin >> a[i];
	}
	for (int i : range(N)) {
		cin >> b[i];
	}
	LL base = 0;
	for (int i : range(N)) {
		base += a[i];
	}
	for (int i : range(1,N-1)) {
		LL x = b[i] - a[i];
		ins(i);
	}
	for (int _ : range(Q)) {
		int p; LL x, y;
		cin >> p >> x >> y;
		p--;
		base -= a[p]; ers(p);
		a[p] = x;
		b[p] = y;
		base += a[p]; ins(p);
		if (pl.size() % 2 == 0) {
			cout << base + sum << endl;
		}
		else {
			cout << base + sum + max(mi.rbegin()->first, -pl.begin()->first)<<endl;
		}
	}

	return 0;
}
