#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1e9 + 7;
long long int solve(const vector<long long int>& a,
                    const vector<long long int>& b) {
  long long int x = 0;
  int n = a.size() / 2;
  vector<long long int> pool(2 * n - 2);
  long long int tot = 0;
  for (int i = (int)(0); i < (int)(2 * n); i++) {
    if (i >= 1 && i < 2 * n - 1) {
      pool[i - 1] = b[i] - a[i];
    }
    tot += a[i];
  }
  sort(pool.rbegin(), pool.rend());
  for (int i = 0; i <= 2 * n - 4; i += 2) {
    long long int u = pool[i] + pool[i + 1];
    if (u > 0) {
      tot += u;
    } else {
      break;
    }
  }
  return tot;
}
int main(void) {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, q;
  cin >> n >> q;
  vector<long long int> a(2 * n), b(2 * n);
  for (int i = (int)(0); i < (int)(2 * n); i++) {
    cin >> a[i];
  }
  for (int i = (int)(0); i < (int)(2 * n); i++) {
    cin >> b[i];
  }
  assert(n * q <= 100000);
  for (int i = (int)(0); i < (int)(q); i++) {
    int p, x, y;
    cin >> p >> x >> y;
    p--;
    a[p] = x;
    b[p] = y;
    cout << solve(a, b) << "\n";
  }
}
