#include <bits/stdc++.h>
using namespace std;
template <typename T>
using V = vector<T>;
template <typename T>
using VV = V<V<T>>;
template <typename T, typename U>
using P = pair<T, U>;
using ll = int64_t;
using PLL = P<ll, ll>;
template <typename T>
const T &var_min(const T &t) {
  return t;
}
template <typename T>
const T &var_max(const T &t) {
  return t;
}
template <typename Head, typename... Tail>
const Head &var_min(const Head &head, const Tail &...tail) {
  return min(head, var_min(tail...));
}
template <typename Head, typename... Tail>
const Head &var_max(const Head &head, const Tail &...tail) {
  return max(head, var_max(tail...));
}
template <typename T, typename... Tail>
void chmin(T &t, const Tail &...tail) {
  t = var_min(t, tail...);
}
template <typename T, typename... Tail>
void chmax(T &t, const Tail &...tail) {
  t = var_max(t, tail...);
}
string to_string(const string &s) { return s; }
template <typename T, typename U>
string to_string(const P<T, U> &p) {
  string ret = "(";
  ret += to_string(p.first);
  ret += ", ";
  ret += to_string(p.second);
  ret += ")";
  return move(ret);
}
template <typename T>
string to_string(const V<T> &v) {
  string ret = "{";
  for (const T &t : v) {
    ret += to_string(t);
    ret += ", ";
  }
  ret += "}";
  return move(ret);
}
template <typename T>
void debug_func(const T &t, const string &s = "") {
  if (s.size()) cout << s << " = ";
  cout << to_string(t) << ((s).size() ? "\n" : "") << flush;
  ;
}
template <typename T>
void debug_func_mult(int idx, const V<string> &names, const T &t) {
  debug_func(t, names[idx]);
}
template <typename T>
void debug_func_mult(const V<string> &names, const T &t) {
  debug_func(t, names[0]);
}
template <typename Head, typename... Tail>
void debug_func_mult(int idx, const V<string> &names, const Head &head,
                     const Tail &...args) {
  debug_func(head, names[idx]);
  debug_func_mult(idx + 1, names, args...);
}
template <typename Head, typename... Tail>
void debug_func_mult(const V<string> &names, const Head &head,
                     const Tail &...args) {
  debug_func(head, names[0]);
  debug_func_mult(1, names, args...);
}
V<string> split_names(string &&s) {
  replace((s).begin(), (s).end(), ' ', ',');
  V<string> ret;
  istringstream ss(s);
  string t;
  while (getline(ss, t, ','))
    if (t.size()) ret.push_back(move(t));
  return move(ret);
}
void init_io() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(30);
}
using TLL = tuple<ll, ll, ll>;
const ll INF = 5e15;
int main() {
  init_io();
  ll N, Q;
  cin >> N >> Q;
  V<ll> A(2 * N), B(2 * N);
  for (ll &e : A) cin >> e;
  for (ll &e : B) cin >> e;
  ll sum = accumulate((A).begin(), (A).end(), 0ll);
  ll pcnt = 0;
  ll psum = 0;
  map<ll, ll> plus, minus;
  for (ll i = 1; i < 2 * N - 1; i++) {
    ll dic = B[i] - A[i];
    if (dic >= 0) {
      pcnt++;
      psum += dic;
      plus[dic]++;
    } else {
      minus[-dic]++;
    }
  }
  auto update_query = [&](ll dic, bool addq) {
    auto &mp = (dic < 0 ? minus : plus);
    dic = abs(dic);
    if (addq) {
      mp[dic]++;
    } else {
      auto ite = mp.find(dic);
      ite->second--;
      if (ite->second == 0) mp.erase(ite);
    }
  };
  auto adjust = [&] {
    if (pcnt % 2 == 0) return psum;
    auto itep = plus.lower_bound(0);
    auto item = minus.lower_bound(0);
    ll mval = min(itep->first, item->first);
    return psum - mval;
  };
  for (ll QQ = 0; QQ < Q; QQ++) {
    ll p, a, b;
    cin >> p >> a >> b;
    p--;
    ll pre_dic = B[p] - A[p];
    ll new_dic = b - a;
    sum = sum - A[p] + a;
    A[p] = a;
    B[p] = b;
    if (p == 0 || p == 2 * N - 1) {
      cout << sum << '\n';
      continue;
    }
    if (pre_dic >= 0) {
      pcnt--;
      psum -= pre_dic;
    }
    if (new_dic >= 0) {
      pcnt++;
      psum += new_dic;
    }
    update_query(pre_dic, false);
    update_query(new_dic, true);
    ll addv = adjust();
    cout << sum + addv << '\n';
  }
  return 0;
}
