#include <bits/stdc++.h>
using namespace std;
#define GET_MACRO(_1, _2, _3, NAME, ...) NAME
#define _repl(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define _rep(i,n) _repl(i,0,n)
#define rep(...) GET_MACRO(__VA_ARGS__, _repl, _rep)(__VA_ARGS__)
#define mp(a,b) make_pair((a),(b))
#define pb(a) push_back((a))
#define all(x) (x).begin(),(x).end()
#define uniq(x) sort(all(x)),(x).erase(unique(all(x)),end(x))
#define fi first
#define se second
#define dbg(...) _dbg(#__VA_ARGS__, __VA_ARGS__)
void _dbg(string){cout<<endl;}
template<class H,class... T> void _dbg(string s,H h,T... t){int l=s.find(',');cout<<s.substr(0,l)<<" = "<<h<<", ";_dbg(s.substr(l+1),t...);}
template<class T,class U> ostream& operator<<(ostream &o, const pair<T,U> &p){o<<"("<<p.fi<<","<<p.se<<")";return o;}
template<class T> ostream& operator<<(ostream &o, const vector<T> &v){o<<"[";for(T t:v){o<<t<<",";}o<<"]";return o;}

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

  vector<int> d(n);
  rep(i,n) d[i] = b[i]-a[i];

  long acc = accumulate(all(a), 0L);
  long plus_sum = 0;

  multiset<int> plus, minus;
  rep(i,1,n-1){
    if(d[i]>=0) plus.insert(d[i]);
    else minus.insert(d[i]);
  }

  for(auto x : plus) plus_sum += x;

  rep(i,q){
    int p,x,y;
    cin>>p>>x>>y;
    p--;

    if(p==0 || p == n-1){
      acc -= a[p];
      a[p] = x;
      b[p] = y;
      acc += a[p];
    }

    else {
      acc -= a[p];
      int old_d = b[p] - a[p];
      if(old_d >= 0){
        plus.erase(plus.lower_bound(old_d));
        plus_sum -= old_d;
      }
      else minus.erase(minus.lower_bound(old_d));

      a[p] = x;
      b[p] = y;
      acc += a[p];
      int new_d = b[p] - a[p];
      if(new_d >= 0){
        plus.insert(new_d);
        plus_sum += new_d;
      }
      else minus.insert(new_d);
    }

    if(plus.size()%2==0) cout << acc + plus_sum << "\n";
    else {
      // 奇数なのでどっちも1以上ある
      long c1 = acc + plus_sum - *plus.begin();
      long c2 = acc + plus_sum + *minus.rbegin();

      cout << max(c1, c2) << "\n";
    }
    // dbg(vector<int>(all(plus)));
    // dbg(vector<int>(all(minus)));
  }

  return 0;
}
