#include <bits/stdc++.h>
using namespace std;
int N, Q, pos, x, y, a[200009], b[200009];
map<int, int> d;
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cin >> N >> Q;
  for (int i = 0; i < 2 * N; i++) cin >> a[i];
  for (int i = 0; i < 2 * N; i++) cin >> b[i];
  long long s = 0;
  int c = 0;
  for (int i = 0; i < 2 * N; i++) {
    if (i == 0 || i == 2 * N - 1)
      s += a[i];
    else {
      if (a[i] > b[i]) c++;
      s += max(a[i], b[i]);
      d[abs(a[i] - b[i])]++;
    }
  }
  for (int i = 0; i < Q; i++) {
    cin >> pos >> x >> y;
    pos--;
    if (pos == 0 || pos == N - 1) {
      s -= a[pos];
      a[pos] = x;
      b[pos] = y;
      s += a[pos];
    } else {
      if (a[pos] > b[pos]) c--;
      s -= max(a[pos], b[pos]);
      d[abs(a[pos] - b[pos])]--;
      if (d[abs(a[pos] - b[pos])] == 0) d.erase(abs(a[pos] - b[pos]));
      a[pos] = x;
      b[pos] = y;
      if (a[pos] > b[pos]) c++;
      s += max(a[pos], b[pos]);
      d[abs(a[pos] - b[pos])]++;
    }
    cout << s - (c & 1 ? d.begin()->first : 0) << '\n';
  }
  return 0;
}
