#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
const ll INF = 1LL << 30;
const ll LINF = 1LL << 60;
const double eps = 1e-5;
const ll MOD = 1000000007LL;
template <typename T>
void chmin(T &a, T b) {
  a = min(a, b);
};
template <typename T>
void chmax(T &a, T b) {
  a = max(a, b);
};
int dx[4] = {0, 1, 0, -1};
int dy[4] = {1, 0, -1, 0};
int main() {
  int n, q;
  cin >> n >> q;
  n *= 2;
  vector<ll> a(n), b(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  multiset<ll> st;
  int c = 0;
  ll ans = 0;
  for (int i = 0; i < n; i++) {
    cin >> b[i];
    if (i == 0 || i == n - 1) {
      ans += a[i];
    } else {
      st.insert(abs(a[i] - b[i]));
      ans += max(a[i], b[i]);
      if (a[i] > b[i]) c ^= 1;
    }
  }
  while (q--) {
    ll p, x, y;
    cin >> p >> x >> y;
    --p;
    if (p == 0 || p == 2 * n - 1) {
      ans += x - a[p];
      a[p] = x;
    } else {
      if (a[p] > b[p]) c ^= 1;
      if (x > y) c ^= 1;
      ans += max(x, y) - max(a[p], b[p]);
      st.erase(st.lower_bound(abs(a[p] - b[p])));
      st.insert(abs(x - y));
      a[p] = x, b[p] = y;
    }
    if (c) {
      cout << ans - (*st.begin()) << endl;
    } else {
      cout << ans << endl;
    }
  }
}
