#include <cstdio>
#include <cstring>
#include <string>
#include <iostream>
#include <cmath>
#include <bitset>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <algorithm>
using namespace std;
typedef long long int ll;
typedef pair<ll, int> P;

int main()
{
	int n, q;
  cin>>n>>q;
  ll a[200001], b[200001];
  for(int i=1; i<=2*n; i++){
    cin>>a[i];
  }
  for(int i=1; i<=2*n; i++){
    cin>>b[i];
  }
  multiset<ll> st;
  ll ans=a[1]+a[2*n];
  int ct0=0, ct1=0;
  for(int i=2; i<2*n; i++){
    if(b[i]>a[i]){
      ct1++;
    }else if(b[i]==a[i]){
      ct0++;
    }
    st.insert(abs(b[i]-a[i]));
    ans+=max(a[i], b[i]);
  }
  for(int i=0; i<q; i++){
    int p; ll x, y;
    cin>>p>>x>>y;
    if(p==1 || p==2*n){
      ans=ans-a[p]+x;
      a[p]=x; b[p]=y;
    }else{
      if(b[p]>a[p]){
        ct1--;
      }else if(b[p]==a[p]){
        ct0--;
      }
      st.erase(st.lower_bound(abs(b[p]-a[p])));
      ans=ans-max(a[p], b[p])+max(x, y);
      a[p]=x; b[p]=y;
      st.insert(abs(y-x));
      if(y>x){
        ct1++;
      }else if(y==x){
        ct0++;
      }
    }
    if(ct0>0 || ct1%2==0){
      cout<<ans<<endl;
    }else{
      cout<<ans-*(st.begin())<<endl;
    }
  }
	return 0;
}