#include <bits/stdc++.h>
using namespace std;
const int inf = 1 << 30;
const long long INF = 1ll << 59;
const double pi = acos(-1);
const double eps = 1e-7;
const long long mod = 1e5;
const int dx[4] = {0, 1, 0, -1}, dy[4] = {1, 0, -1, 0};
int n, q;
vector<long long> a, b;
int main() {
  cin >> n >> q;
  n *= 2;
  a = b = vector<long long>(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) cin >> b[i];
  long long sum = 0, tmp = 0;
  multiset<long long> st1, st2;
  for (int i = 1; i < n - 1; i++) {
    long long t = a[i] - b[i];
    tmp += b[i];
    if (t > 0) {
      st1.insert(t);
      sum += t;
    } else
      st2.insert(t);
  }
  for (int i = 0; i < q; i++) {
    long long p, x, y;
    cin >> p >> x >> y;
    p--;
    long long t = a[p] - b[p];
    if (t > 0) {
      st1.erase(st1.lower_bound(t));
      sum -= t;
    } else
      st2.erase(st2.lower_bound(t));
    tmp += y - b[p];
    a[p] = x;
    b[p] = y;
    t = a[p] - b[p];
    if (t > 0) {
      st1.insert(t);
      sum += t;
    } else
      st2.insert(t);
    if (st1.size() % 2 == 0)
      cout << sum + tmp + a[0] + a[n - 1] << endl;
    else {
      cout << max(-*st1.begin(), (st2.empty() ? -INF : *(--st2.end()))) + sum +
                  tmp + a[0] + a[n - 1]
           << endl;
    }
  }
}
