#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9 + 7;
const long long longinf = 1LL << 60;
const long long mod = 1e9 + 7;
int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
int main() {
  int n, q;
  cin >> n >> q;
  n *= 2;
  long long a[n], b[n];
  for (int i = (int)0; i < (int)n; ++i) cin >> a[i];
  for (int i = (int)0; i < (int)n; ++i) cin >> b[i];
  long long ans = a[0] + a[n - 1];
  int posi = 0, zero = 0;
  multiset<long long> st;
  for (int i = (int)0; i < (int)n - 2; ++i) {
    ans += max(a[i + 1], b[i + 1]);
    if (a[i + 1] > b[i + 1]) posi++;
    if (a[i + 1] == b[i + 1]) zero++;
    st.insert(abs(a[i + 1] - b[i + 1]));
  }
  for (int i = (int)0; i < (int)q; ++i) {
    long long p, x, y;
    cin >> p >> x >> y;
    p--;
    if (p == 0 || p == n - 1) {
      ans += (long long)(x - a[p]);
      a[p] = x;
      cout << ans << endl;
      continue;
    }
    ans += (long long)(max(x, y) - max(a[p], b[p]));
    auto it = st.lower_bound(abs(a[p] - b[p]));
    st.erase(it);
    st.insert(abs(x - y));
    if (a[p] - b[p] > 0) posi--;
    if (a[p] - b[p] == 0) zero--;
    if (x - y > 0) posi++;
    if (x - y == 0) zero++;
    a[p] = x;
    b[p] = y;
    if (zero > 0 || posi % 2 == 0)
      cout << ans << endl;
    else
      cout << ans - *st.begin() << endl;
  }
  return 0;
}
