#include <bits/stdc++.h>
using namespace std;
template <typename T>
void chmax(T &a, T b) {
  a = max(a, b);
}
template <typename T>
void chmin(T &a, T b) {
  a = min(a, b);
}
template <typename T>
void chadd(T &a, T b) {
  a = a + b;
}
long long int dx[] = {0, 0, 1, -1};
long long int dy[] = {1, -1, 0, 0};
const long long INF = 1001001001001001LL;
const long long MOD = 1000000007LL;
long long int N, Q;
signed main() {
  cin >> N >> Q;
  long long int L = 2 * N;
  vector<long long int> A(L), B(L);
  for (long long int i = 0; i < L; i++) cin >> A[i];
  for (long long int i = 0; i < L; i++) cin >> B[i];
  long long int base = A[0] + A[L - 1];
  long long int asum = accumulate(A.begin(), A.end(), 0LL);
  set<pair<long long int, long long int> > S;
  long long int cur_max = 0;
  for (long long int i = 1; i < L - 1; i++) {
    long long int diff = B[i] - A[i];
    if (diff >= 0) {
      S.insert(make_pair(diff, i));
      cur_max += diff;
    }
  }
  for (long long int i = 0; i < Q; i++) {
    long long int p, x, y;
    cin >> p >> x >> y;
    p--;
    asum -= A[p];
    if (p != 0 && p != L - 1) {
      pair<long long int, long long int> elem = make_pair(B[p] - A[p], p);
      if (S.count(elem)) {
        S.erase(elem);
        cur_max -= B[p] - A[p];
      }
    }
    A[p] = x, B[p] = y;
    asum += A[p];
    if (p != 0 && p != L - 1) {
      pair<long long int, long long int> n_elem = make_pair(B[p] - A[p], p);
      if (n_elem.first >= 0) {
        S.insert(n_elem);
        cur_max += n_elem.first;
      }
    }
    long long int sz = S.size(), tmp_max = cur_max;
    for (auto it = S.begin(); it != S.end(); it++) {
      if (sz % 2 == 0) break;
      sz--;
      tmp_max -= it->first;
    }
    cout << asum + tmp_max << endl;
  }
  return 0;
}
