#include <bits/stdc++.h>
using namespace std;
long long n, q;
vector<long long> a, b, c;
multiset<long long> l, r;
long long ans = 0;
long long p, x, y;
int main() {
  cin >> n >> q;
  a = vector<long long>(2 * n);
  b = vector<long long>(2 * n);
  c = vector<long long>(2 * n);
  for (long long i = 0; i < 2 * n; i++) cin >> a[i];
  for (long long i = 0; i < 2 * n; i++) cin >> b[i];
  for (long long i = 0; i < 2 * n; i++) c[i] = a[i] - b[i];
  ans = accumulate(a.begin(), a.end(), 0ll);
  for (long long i = 1; i < 2 * n - 1; i++) {
    if (c[i] < 0) {
      r.insert(c[i]);
    } else {
      l.insert(c[i]);
    }
  }
  for (long long x : r) {
    ans -= x;
  }
  for (long long i = 0; i < q; i++) {
    cin >> p >> x >> y;
    p--;
    if (p >= 1 && p < 2 * n - 1) {
      if (l.find(c[p]) != l.end())
        l.erase(l.find(c[p]));
      else if (r.find(c[p]) != r.end()) {
        r.erase(r.find(c[p]));
        ans += c[p];
      }
    }
    ans -= a[p];
    a[p] = x;
    b[p] = y;
    c[p] = a[p] - b[p];
    ans += a[p];
    if (p >= 1 && p < 2 * n - 1) {
      if (c[p] < 0) {
        r.insert(c[p]);
        ans -= c[p];
      } else
        l.insert(c[p]);
    }
    if (r.size() % 2 == 1 && *r.rbegin() + *l.begin() < 0)
      cout << ans + *l.begin() << endl;
    else if (r.size() % 2 == 1 && *r.rbegin() + *l.begin() >= 0)
      cout << ans + *r.rbegin() << endl;
    else
      cout << ans << endl;
  }
}
