#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
const int MAXN = 100000;
int n, nq;
int a[2 * MAXN], b[2 * MAXN];
long long now;
bool same[2 * MAXN];
set<pair<int, int> > same2diff;
set<pair<int, int> > diff2same;
void change(set<pair<int, int> > &s, int idx, int oval, int nval) {
  s.erase(make_pair(oval, idx));
  s.insert(make_pair(nval, idx));
}
void update() {
  while (true) {
    bool change = false;
    while (((int)(same2diff).size()) >= 2) {
      auto a = same2diff.end();
      --a;
      auto b = a;
      --b;
      if (a->first + b->first <= 0) break;
      now += a->first + b->first;
      same[a->second] = same[b->second] = false;
      diff2same.insert(make_pair(-a->first, a->second));
      diff2same.insert(make_pair(-b->first, b->second));
      same2diff.erase(a);
      same2diff.erase(b);
      change = true;
    }
    while (((int)(diff2same).size()) >= 2) {
      auto a = diff2same.end();
      --a;
      auto b = a;
      --b;
      if (a->first + b->first <= 0) break;
      now += a->first + b->first;
      same[a->second] = same[b->second] = true;
      same2diff.insert(make_pair(-a->first, a->second));
      same2diff.insert(make_pair(-b->first, b->second));
      diff2same.erase(a);
      diff2same.erase(b);
      change = true;
    }
    if (!change) break;
  }
}
void run() {
  scanf("%d%d", &n, &nq);
  for (int i = (0); i < (2 * n); ++i) scanf("%d", &a[i]);
  for (int i = (0); i < (2 * n); ++i) scanf("%d", &b[i]);
  now = 0;
  same2diff.clear();
  diff2same.clear();
  for (int i = (0); i < (2 * n); ++i) {
    now += a[i];
    same[i] = true;
    if (i != 0 && i != 2 * n - 1) same2diff.insert(make_pair(b[i] - a[i], i));
  }
  for (int qi = (0); qi < (nq); ++qi) {
    int idx, aval, bval;
    scanf("%d%d%d", &idx, &aval, &bval);
    --idx;
    if (same[idx])
      now += aval - a[idx];
    else
      now += bval - b[idx];
    if (idx != 0 && idx != 2 * n - 1) {
      if (same[idx])
        change(same2diff, idx, b[idx] - a[idx], bval - aval);
      else
        change(diff2same, idx, a[idx] - b[idx], aval - bval);
    }
    a[idx] = aval, b[idx] = bval;
    update();
    printf("%lld\n", now);
  }
}
int main() {
  run();
  return 0;
}
