#include <algorithm>  
#include <iostream>  
#include <sstream>  
#include <string>  
#include <cstring>
#include <vector>  
#include <queue>  
#include <set>  
#include <map>  
#include <cstdio>  
#include <cstdlib>  
#include <cctype>  
#include <cmath>  
#include <list>  
#include <cassert>
#include <ctime>
#include <climits>
using namespace std;  

#define PB push_back  
#define MP make_pair  
#define SZ(v) ((int)(v).size())  
#define FOR(i,a,b) for(int i=(a);i<(b);++i)  
#define REP(i,n) FOR(i,0,n)  
#define FORE(i,a,b) for(int i=(a);i<=(b);++i)  
#define REPE(i,n) FORE(i,0,n)  
#define FORSZ(i,a,v) FOR(i,a,SZ(v))  
#define REPSZ(i,v) REP(i,SZ(v))  
typedef long long ll;
typedef unsigned long long ull;
ll gcd(ll a,ll b) { return b==0?a:gcd(b,a%b); }

const int MAXN = 100000;

int n, nq;
int a[2 * MAXN], b[2 * MAXN];

ll now;
bool same[2 * MAXN];
set<pair<int,int> > same2diff;
set<pair<int,int> > diff2same;

void change(set<pair<int, int> > &s, int idx, int oval, int nval) {
	s.erase(MP(oval, idx)); s.insert(MP(nval, idx));
}

void update() {
	while (true) {
		bool change = false;
		while (SZ(same2diff) >= 2) {
			auto a = same2diff.end(); --a; auto b = a; --b;
			if ((ll)a->first + b->first <= 0) break;
			now += (ll)a->first + b->first;
			same[a->second] = same[b->second] = false;
			diff2same.insert(MP(-a->first, a->second));
			diff2same.insert(MP(-b->first, b->second));
			same2diff.erase(a);
			same2diff.erase(b);
			change = true;
		}
		while (SZ(diff2same) >= 2) {
			auto a = diff2same.end(); --a; auto b = a; --b;
			if ((ll)a->first + b->first <= 0) break;
			now += (ll)a->first + b->first;
			same[a->second] = same[b->second] = true;
			same2diff.insert(MP(-a->first, a->second));
			same2diff.insert(MP(-b->first, b->second));
			diff2same.erase(a);
			diff2same.erase(b);
			change = true;
		}
		while (SZ(same2diff) >= 1 && SZ(diff2same) >= 1) {
			auto a = same2diff.end(); --a; auto b = diff2same.end(); --b;
			if ((ll)a->first + b->first <= 0) break;
			now += (ll)a->first + b->first;
			same[a->second] = false, same[b->second] = true;
			diff2same.insert(MP(-a->first, a->second));
			same2diff.insert(MP(-b->first, b->second));
			same2diff.erase(a);
			diff2same.erase(b);
			change = true;
		}
		if (!change) break;
	}
}

void run() {
	scanf("%d%d", &n, &nq); REP(i, 2 * n) scanf("%d", &a[i]); REP(i, 2 * n) scanf("%d", &b[i]);
	now = 0; same2diff.clear(); diff2same.clear();
	REP(i, 2 * n) {
		now += a[i]; same[i] = true;
		if (i != 0 && i != 2 * n - 1) same2diff.insert(MP(b[i] - a[i], i));
	}
	REP(qi, nq) {
		int idx, aval, bval; scanf("%d%d%d", &idx, &aval, &bval); --idx;
		if (same[idx]) now += aval - a[idx];
		else now += bval - b[idx];
		if (idx != 0 && idx != 2 * n - 1) {
			if (same[idx]) change(same2diff, idx, b[idx] - a[idx], bval - aval);
			else change(diff2same, idx, a[idx] - b[idx], aval - bval);
		}
		a[idx] = aval, b[idx] = bval;
		update();
		printf("%lld\n", now);
	}
}

int main() {
	run();
	return 0;
}
