#include <bits/stdc++.h>
template <typename T>
void MACRO_VAR_Scan(T& t) {
  std::cin >> t;
}
template <typename First, typename... Rest>
void MACRO_VAR_Scan(First& first, Rest&... rest) {
  std::cin >> first;
  MACRO_VAR_Scan(rest...);
}
template <typename T>
void MACRO_VEC_ROW_Init(int n, T& t) {
  t.resize(n);
}
template <typename First, typename... Rest>
void MACRO_VEC_ROW_Init(int n, First& first, Rest&... rest) {
  first.resize(n);
  MACRO_VEC_ROW_Init(n, rest...);
}
template <typename T>
void MACRO_VEC_ROW_Scan(int p, T& t) {
  std::cin >> t[p];
}
template <typename First, typename... Rest>
void MACRO_VEC_ROW_Scan(int p, First& first, Rest&... rest) {
  std::cin >> first[p];
  MACRO_VEC_ROW_Scan(p, rest...);
}
template <typename T>
inline T CHMAX(T& a, const T b) {
  return a = (a < b) ? b : a;
}
template <typename T>
inline T CHMIN(T& a, const T b) {
  return a = (a > b) ? b : a;
}
void CHECKTIME(std::function<void()> f) {
  auto start = std::chrono::system_clock::now();
  f();
  auto end = std::chrono::system_clock::now();
  auto res = std::chrono::duration_cast<std::chrono::nanoseconds>((end - start))
                 .count();
  std::cerr << "[Time:" << res << "ns  (" << res / (1.0e9) << "s)]\n";
}
template <class T>
std::vector<std::vector<T>> VV(int n, int m, T init = T()) {
  return std::vector<std::vector<T>>(n, std::vector<T>(m, init));
}
template <typename S, typename T>
std::ostream& operator<<(std::ostream& os, std::pair<S, T> p) {
  os << "(" << p.first << ", " << p.second << ")";
  return os;
}
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using PAIR = std::pair<int, int>;
using PAIRLL = std::pair<ll, ll>;
constexpr int INFINT = 1 << 30;
constexpr int INFINT_LIM = (1LL << 31) - 1;
constexpr ll INFLL = 1LL << 60;
constexpr ll INFLL_LIM = (1LL << 62) - 1 + (1LL << 62);
constexpr double EPS = 1e-9;
constexpr int MOD = 1000000007;
constexpr double PI = 3.141592653589793238462643383279;
template <class T, size_t N>
void FILL(T (&a)[N], const T& val) {
  for (auto& x : a) x = val;
}
template <class ARY, size_t N, size_t M, class T>
void FILL(ARY (&a)[N][M], const T& val) {
  for (auto& b : a) FILL(b, val);
}
template <class T>
void FILL(std::vector<T>& a, const T& val) {
  for (auto& x : a) x = val;
}
template <class ARY, class T>
void FILL(std::vector<std::vector<ARY>>& a, const T& val) {
  for (auto& b : a) FILL(b, val);
}
signed main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(0);
  ;
  int n, q;
  MACRO_VAR_Scan(n, q);
  ;
  std::vector<int> a(2 * n);
  for (auto& i : a) std::cin >> i;
  ;
  std::vector<int> b(2 * n);
  for (auto& i : b) std::cin >> i;
  ;
  int sum = 0;
  for (int i = 0; i < int(2 * n); ++i) sum += a[i];
  std::multiset<int> A, B;
  int tsum = 0;
  for (int i = 0; i < int(2 * n); ++i) {
    if (i == 0 || i == 2 * n - 1) continue;
    int t = b[i] - a[i];
    if (t >= 0)
      B.insert(t), tsum += t;
    else
      A.insert(t);
  }
  auto norm = [&] {
    while (!A.empty() && *A.rbegin() >= 0) {
      int t = *A.rbegin();
      A.erase(A.find(t));
      B.insert(t);
      tsum += t;
    }
    while (!B.empty() && *B.begin() < 0) {
      int t = *B.begin();
      B.erase(B.find(t));
      A.insert(t);
      tsum -= t;
    }
    if (A.size() % 2 == 1) {
      int aa = *A.rbegin();
      int bb = *B.begin();
      if (-aa < bb) {
        A.erase(A.find(aa));
        B.insert(aa);
        tsum += aa;
      } else {
        B.erase(B.find(bb));
        A.insert(bb);
        tsum -= bb;
      }
    }
  };
  for (int _ = 0; _ < int(q); ++_) {
    int p, x, y;
    MACRO_VAR_Scan(p, x, y);
    ;
    --p;
    sum += x - a[p];
    int pre = b[p] - a[p];
    a[p] = x;
    b[p] = y;
    if (p > 0 && p < 2 * n - 1) {
      int t = y - x;
      if (A.count(pre)) {
        A.erase(A.find(pre));
      } else if (B.count(pre)) {
        B.erase(B.find(pre));
        tsum -= pre;
      }
      A.insert(t);
    }
    norm();
    std::cout << (sum + tsum);
    std::cout << "\n";
    ;
  }
  return 0;
}
