#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using PII = pair<int, int>;
template <typename A, typename B>
inline void chmin(A &a, B b) {
  if (a > b) a = b;
}
template <typename A, typename B>
inline void chmax(A &a, B b) {
  if (a < b) a = b;
}
using PLL = pair<ll, ll>;
class RMQ {
 private:
  int n;
  vector<PLL> node, lazy;
  vector<bool> lazyFlag;

 public:
  RMQ(vector<ll> v) {
    int sz = v.size();
    n = 1;
    while (n < sz) n *= 2;
    node.resize(2 * n - 1, {-(ll)1e18, -1});
    lazy.resize(2 * n - 1, {0, -1});
    lazyFlag.resize(2 * n - 1, false);
    for (int i = 0; i < (sz); i++) node[i + n - 1] = {v[i], i};
    for (int i = n - 2; i >= 0; i--)
      node[i] = max(node[2 * i + 1], node[2 * i + 2]);
  }
  void eval(int k, int l, int r) {
    if (lazyFlag[k]) {
      node[k] = {lazy[k].first, l};
      if (r - l > 1) {
        lazy[2 * k + 1] = lazy[k];
        lazy[2 * k + 2] = lazy[k];
        lazyFlag[2 * k + 1] = lazyFlag[2 * k + 2] = true;
      }
      lazy[k] = {0, -1};
      lazyFlag[k] = false;
    }
  }
  void update(int a, int b, PLL x, int k = 0, int l = 0, int r = -1) {
    if (r < 0) r = n;
    eval(k, l, r);
    if (b <= l || r <= a) return;
    if (a <= l && r <= b) {
      lazy[k] = x;
      lazyFlag[k] = true;
      eval(k, l, r);
    } else {
      update(a, b, x, k * 2 + 1, l, (l + r) / 2);
      update(a, b, x, k * 2 + 2, (l + r) / 2, r);
      node[k] = max(node[k * 2 + 1], node[k * 2 + 2]);
    }
  }
  PLL query(int a, int b, int k = 0, int l = 0, int r = -1) {
    if (r < 0) r = n;
    eval(k, l, r);
    if (b <= l || r <= a) return {-(ll)1e18, -1};
    if (a <= l && r <= b) return node[k];
    return max(query(a, b, k * 2 + 1, l, (l + r) / 2),
               query(a, b, k * 2 + 2, (l + r) / 2, r));
  }
};
ll a[214514], b[214514];
ll res = 0;
priority_queue<PII, vector<PII> > pq;
int main(void) {
  int N, Q;
  bool used[214514] = {};
  cin >> N >> Q;
  RMQ rmq(vector<ll>(2 * N));
  for (int i = 0; i < (2 * N); i++) cin >> a[i];
  for (int i = 0; i < (2 * N); i++) cin >> b[i];
  for (int i = (1); i < (2 * N - 1); i++) {
    pq.push({b[i] - a[i], i});
  }
  while (pq.size() && pq.top().first > 0) {
    int v = pq.top().first, in = pq.top().second;
    pq.pop();
    if (v + pq.top().first > 0) {
      used[in] = 1;
      used[pq.top().second] = 1;
      pq.pop();
    }
  }
  res += a[0] + a[2 * N - 1];
  for (int i = (1); i < (2 * N - 1); i++) {
    if (used[i]) {
      res += b[i];
      rmq.update(i, i + 1, {a[i] - b[i], i});
    } else {
      res += a[i];
      rmq.update(i, i + 1, {b[i] - a[i], i});
    }
  }
  for (int i = 0; i < (Q); i++) {
    ll p, x, y;
    cin >> p >> x >> y;
    p--;
    if (p == 0 || p == 2 * N - 1) {
      res = res - a[i] + x;
      a[i] = x;
      b[i] = y;
      continue;
    }
    res += used[p] ? -b[p] : -a[p];
    used[p] = 1 - used[p];
    a[p] = x;
    b[p] = y;
    if (used[p]) {
      rmq.update(p, p + 1, {x - y, p});
      res += y;
    } else {
      rmq.update(p, p + 1, {y - x, p});
      res += x;
    }
    PLL pl = rmq.query(1, 2 * N - 1);
    res += pl.first;
    rmq.update(pl.second, pl.second + 1, {-pl.first, pl.second});
    cout << res << endl;
    used[pl.second] = 1 - used[pl.second];
  }
}
