#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
 
using namespace std;
using namespace __gnu_pbds;
 
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define fbo find_by_order
#define ook order_of_key
 
typedef long long ll;
typedef pair<ll,ll> ii;
typedef vector<int> vi;
typedef long double ld; 
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> pbds;
typedef set<int>::iterator sit;
typedef map<int,int>::iterator mit;
typedef vector<int>::iterator vit;

ll a[411111];
ll b[411111];
multiset<ll> pos;
multiset<ll> neg;
ll sumpos;

void add(ll x)
{
	if(x>0)
	{
		pos.insert(x);
		sumpos+=x;
	}
	else
	{
		neg.insert(-x);
	}
}

void del(ll x)
{
	if(x>0)
	{
		auto it = pos.lower_bound(x);
		pos.erase(it);
		sumpos-=x;
	}
	else
	{
		auto it = neg.lower_bound(-x);
		neg.erase(it);
	}
}

int main()
{
	ios_base::sync_with_stdio(0); cin.tie(0);
	sumpos=0;
	int n,q; cin>>n>>q; n*=2;
	ll sum=0;
	for(int i=0;i<n;i++)
	{
		cin>>a[i];
		sum+=a[i];
	}
	for(int i=0;i<n;i++)
	{
		cin>>b[i];
		b[i]-=a[i];
		if(i>=1&&i+1<n) add(b[i]);
	}
	for(int i=0;i<q;i++)
	{
		int p,u,v;
		cin>>p>>u>>v;
		p--;
		sum-=a[p]; sum+=u;
		if(p>=1&&p+1<n)
		{
			del(b[p]); add(v-u);
		}
		a[p]=u; b[p]=v-u;
		if(pos.size()%2==0)
		{
			cout<<sum+sumpos<<'\n';
		}
		else
		{
			if(neg.empty())
			{
				cout<<sum+sumpos-(*pos.begin())<<'\n';
			}
			else
			{
				cout<<sum+max(sumpos-(*pos.begin()), sumpos-(*neg.begin()))<<'\n';
			}
		}
	}
}	
