#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, q;
  cin >> n >> q;
  long long int a[200001], b[200001];
  for (int i = 1; i <= 2 * n; i++) {
    cin >> a[i];
  }
  for (int i = 1; i <= 2 * n; i++) {
    cin >> b[i];
  }
  multiset<long long int> st;
  long long int ans = a[1] + a[2 * n];
  for (int i = 2; i < 2 * n; i++) {
    if (b[i] >= a[i]) st.insert(b[i] - a[i]);
    ans += max(a[i], b[i]);
  }
  for (int i = 0; i < q; i++) {
    int p;
    long long int x, y;
    cin >> p >> x >> y;
    if (p == 1 || p == 2 * n) {
      ans = ans - a[p] + x;
      a[p] = x;
      b[p] = y;
    } else {
      if (b[p] >= a[p]) st.erase(st.lower_bound(b[p] - a[p]));
      ans = ans - max(a[p], b[p]) + max(x, y);
      a[p] = x;
      b[p] = y;
      if (y >= x) st.insert(y - x);
    }
    if ((st.size()) % 2 == 0) {
      cout << ans << endl;
    } else {
      cout << ans - *(st.begin()) << endl;
    }
  }
  return 0;
}
