#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;

#define fi first
#define se second
#define repl(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++)
#define rep(i,n) repl(i,0,n)
#define each(itr,v) for(auto itr:v)
#define pb push_back
#define all(x) (x).begin(),(x).end()
#define dbg(x) cout<<#x"="<<x<<endl
#define mmax(x,y) (x>y?x:y)
#define mmin(x,y) (x<y?x:y)
#define maxch(x,y) x=mmax(x,y)
#define minch(x,y) x=mmin(x,y)
#define uni(x) x.erase(unique(all(x)),x.end())
#define exist(x,y) (find(all(x),y)!=x.end())
#define bcnt __builtin_popcount

#define INF INT_MAX/3

ll n,q;
ll a[201010],b[201010];
multiset<ll> ps,ms;
ll asum,psum;

int main(){
  cin>>n>>q;
  n*=2;
  rep(i,n)cin>>a[i];
  rep(i,n)cin>>b[i];
  rep(i,n){
    asum+=a[i];
  }

  repl(i,1,n-1){
    if(b[i]-a[i]>=0){
      ps.insert(b[i]-a[i]);
      psum+=b[i]-a[i];
    }else ms.insert(b[i]-a[i]);
  }

  while(q--){
    ll p,x,y;
    cin>>p>>x>>y;
    p--;
    if(p==0||p==n-1){
      asum-=a[p];
      a[p]=x; b[p]=y;
      asum+=a[p];
    }else{
      if(b[p]-a[p]>=0){
        ps.erase(ps.lower_bound(b[p]-a[p]));
        psum-=b[p]-a[p];

        asum-=a[p];
        a[p]=x; b[p]=y;
        asum+=a[p];

        if(b[p]-a[p]>=0){
          ps.insert(b[p]-a[p]);
          psum+=b[p]-a[p];
        }else{
          ms.insert(b[p]-a[p]);
        }
      }else{
        ms.erase(ms.lower_bound(b[p]-a[p]));

        asum-=a[p];
        a[p]=x; b[p]=y;
        asum+=a[p];

        if(b[p]-a[p]>=0){
          ps.insert(b[p]-a[p]);
          psum+=b[p]-a[p];
        }else{
          ms.insert(b[p]-a[p]);
        }
      }
    }

    if(ps.size()%2==0)cout<<asum+psum<<endl;
    else{
      ll hoge=asum+psum+(*ms.rbegin());
      ll fuga=asum+psum-(*ps.begin());
      cout<<max(hoge,fuga)<<endl;
    }
  }

  return 0;
}
