#include <bits/stdc++.h>
typedef struct AVL_node_sub {
  long long key;
  long long val;
  long long ele_num;
  long long height;
  struct AVL_node_sub *left;
  struct AVL_node_sub *right;
} AVL_node;
typedef struct {
  AVL_node *root;
} AVL_tree;
long long max(long long a, long long b) { return a >= b ? a : b; }
long long compare_AVL(long long a, long long b) { return a - b; }
long long ele_num(AVL_node *r) {
  if (r == NULL) {
    return 0;
  } else {
    return r->ele_num;
  }
}
long long height(AVL_node *r) {
  if (r == NULL) {
    return 0;
  } else {
    return r->height;
  }
}
void release_AVL_node(AVL_node *r) { free(r); }
AVL_node *build_AVL_node(long long key, long long val, AVL_node *left,
                         AVL_node *right) {
  AVL_node *newr;
  long long left_h = height(left);
  long long right_h = height(right);
  if (left_h > right_h + 1) {
    AVL_node *ll = left->left;
    AVL_node *lr = left->right;
    if (height(ll) < height(lr)) {
      newr = build_AVL_node(lr->key, lr->val,
                            build_AVL_node(left->key, left->val, ll, lr->left),
                            build_AVL_node(key, val, lr->right, right));
      release_AVL_node(lr);
    } else {
      newr = build_AVL_node(left->key, left->val, ll,
                            build_AVL_node(key, val, lr, right));
    }
    release_AVL_node(left);
  } else if (right_h > left_h + 1) {
    AVL_node *rr = right->right;
    AVL_node *rl = right->left;
    if (height(rr) < height(rl)) {
      newr = build_AVL_node(
          rl->key, rl->val, build_AVL_node(key, val, left, rl->left),
          build_AVL_node(right->key, right->val, rl->right, rr));
      release_AVL_node(rl);
    } else {
      newr = build_AVL_node(right->key, right->val,
                            build_AVL_node(key, val, left, rl), rr);
    }
    release_AVL_node(right);
  } else {
    newr = (AVL_node *)malloc(sizeof(AVL_node));
    newr->key = key;
    newr->val = val;
    newr->ele_num = ele_num(left) + ele_num(right) + 1;
    newr->height = max(left_h, right_h) + 1;
    newr->left = left;
    newr->right = right;
  }
  return newr;
}
AVL_node *find_AVL_sub(long long key, AVL_node *r) {
  if (r == NULL) {
    return NULL;
  }
  long long comp = compare_AVL(key, r->key);
  if (comp == 0) {
    return r;
  } else if (comp < 0) {
    return find_AVL_sub(key, r->left);
  } else {
    return find_AVL_sub(key, r->right);
  }
}
AVL_node *kth_smallest_AVL_sub(long long k, AVL_node *r) {
  if (r == NULL || k < 1) {
    printf(
        "In function 'kth_smallest_AVL_sub':\nargument 'k' is out of range\n");
    return NULL;
  } else if (r->ele_num < k) {
    printf(
        "In function 'kth_smallest_AVL_sub':\nargument 'k' is out of range\n");
    return NULL;
  } else if (ele_num(r->left) == k - 1) {
    return r;
  } else if (ele_num(r->left) > k - 1) {
    return kth_smallest_AVL_sub(k, r->left);
  } else {
    return kth_smallest_AVL_sub(k - ele_num(r->left) - 1, r->right);
  }
}
long long num_less_than_AVL_sub(long long key, AVL_node *r) {
  if (r == NULL) {
    return 0;
  } else if (compare_AVL(key, r->key) < 0) {
    return num_less_than_AVL_sub(key, r->left);
  } else {
    return ele_num(r->left) + num_less_than_AVL_sub(key, r->right) + 1;
  }
}
AVL_node *next_largest_AVL_sub(long long key, AVL_node *r) {
  if (r == NULL) {
    return NULL;
  } else if (compare_AVL(key, r->key) <= 0) {
    return next_largest_AVL_sub(key, r->left);
  } else {
    AVL_node *candidate = next_largest_AVL_sub(key, r->right);
    if (candidate == NULL) {
      return r;
    } else {
      return candidate;
    }
  }
}
AVL_node *next_smallest_AVL_sub(long long key, AVL_node *r) {
  if (r == NULL) {
    return NULL;
  } else if (compare_AVL(key, r->key) >= 0) {
    return next_smallest_AVL_sub(key, r->right);
  } else {
    AVL_node *candidate = next_smallest_AVL_sub(key, r->left);
    if (candidate == NULL) {
      return r;
    } else {
      return candidate;
    }
  }
}
AVL_node *insert_AVL_sub(long long key, long long val, AVL_node *r) {
  AVL_node *newr;
  if (r == NULL) {
    newr = build_AVL_node(key, val, NULL, NULL);
  } else {
    long long comp = compare_AVL(key, r->key);
    if (comp < 0) {
      newr = build_AVL_node(r->key, r->val, insert_AVL_sub(key, val, r->left),
                            r->right);
    } else {
      newr = build_AVL_node(r->key, r->val, r->left,
                            insert_AVL_sub(key, val, r->right));
    }
    release_AVL_node(r);
  }
  return newr;
}
AVL_node *erase_AVL_sub_sub(AVL_node *r) {
  if (r->left == NULL) {
    return r->right;
  } else {
    return build_AVL_node(r->key, r->val, erase_AVL_sub_sub(r->left), r->right);
  }
}
AVL_node *erase_AVL_sub(long long key, AVL_node *r, AVL_node **ans) {
  AVL_node *newr;
  if (r == NULL) {
    newr = NULL;
  } else {
    long long comp = compare_AVL(key, r->key);
    if (comp == 0) {
      *ans = r;
      if (r->left == NULL && r->right == NULL) {
        newr = NULL;
      } else if (r->right == NULL) {
        newr = r->left;
      } else if (r->left == NULL) {
        newr = r->right;
      } else {
        AVL_node *next_larger = kth_smallest_AVL_sub(1, r->right);
        newr = build_AVL_node(next_larger->key, next_larger->val, r->left,
                              erase_AVL_sub_sub(r->right));
        release_AVL_node(next_larger);
      }
    } else {
      if (comp < 0) {
        newr = build_AVL_node(r->key, r->val, erase_AVL_sub(key, r->left, ans),
                              r->right);
      } else {
        newr = build_AVL_node(r->key, r->val, r->left,
                              erase_AVL_sub(key, r->right, ans));
      }
      release_AVL_node(r);
    }
  }
  return newr;
}
void storeall_AVL_sub(long long *array, long long k, AVL_node *r) {
  if (r != NULL) {
    storeall_AVL_sub(array, k, r->left);
    array[k + ele_num(r->left)] = r->key;
    storeall_AVL_sub(array, k + ele_num(r->left) + 1, r->right);
  }
}
void outall_AVL_sub(AVL_node *r) {
  if (r != NULL) {
    outall_AVL_sub(r->left);
    printf("(key, val, ele_num, height) = (%d, %d, %d, %d)\n", r->key, r->val,
           r->ele_num, r->height);
    outall_AVL_sub(r->right);
  }
}
AVL_tree *make_AVL_tree() {
  AVL_tree *t = (AVL_tree *)malloc(sizeof(AVL_tree));
  t->root = NULL;
  return t;
}
long long element_num_AVL(AVL_tree *t) { return ele_num(t->root); }
AVL_node *find_AVL(long long key, AVL_tree *t) {
  return find_AVL_sub(key, t->root);
}
AVL_node *kth_smallest_AVL(long long k, AVL_tree *t) {
  return kth_smallest_AVL_sub(k, t->root);
}
long long num_less_than_AVL(long long key, AVL_tree *t) {
  return num_less_than_AVL_sub(key, t->root);
}
AVL_node *next_largest_AVL(long long key, AVL_tree *t) {
  return next_largest_AVL_sub(key, t->root);
}
AVL_node *next_smallest_AVL(long long key, AVL_tree *t) {
  return next_smallest_AVL_sub(key, t->root);
}
void insert_AVL(long long key, long long val, AVL_tree *t) {
  t->root = insert_AVL_sub(key, val, t->root);
}
AVL_node *erase_AVL(long long key, AVL_tree *t) {
  AVL_node *ans = NULL;
  t->root = erase_AVL_sub(key, t->root, &ans);
  return ans;
}
long long *storeall_AVL(AVL_tree *t) {
  long long *array =
      (long long *)malloc(sizeof(long long) * element_num_AVL(t));
  storeall_AVL_sub(array, 0, t->root);
  return array;
}
void outall_AVL(AVL_tree *t) { outall_AVL_sub(t->root); }
signed main() {
  long long N, Q, i;
  scanf("%lld%lld", &N, &Q);
  long long *a = (long long *)malloc(sizeof(long long) * (2 * N));
  long long *b = (long long *)malloc(sizeof(long long) * (2 * N));
  long long *b_sub_a = (long long *)malloc(sizeof(long long) * (2 * N));
  for (i = 0; i < 2 * N; i++) {
    scanf("%lld", &a[i]);
  }
  for (i = 0; i < 2 * N; i++) {
    scanf("%lld", &b[i]);
  }
  long long suma = 0, sum_p = 0, sum_m = 0, num_p = 0;
  for (i = 0; i < 2 * N; i++) {
    b_sub_a[i] = b[i] - a[i];
    suma += a[i];
  }
  AVL_tree *t = make_AVL_tree();
  for (i = 1; i < 2 * N - 1; i++) {
    if (b_sub_a[i] >= 0) {
      sum_p += b_sub_a[i];
      num_p++;
    } else {
      sum_m += b_sub_a[i];
    }
    insert_AVL(b_sub_a[i], 1, t);
  }
  AVL_node *r;
  long long p, x, y, y_sub_x, ans;
  for (i = 0; i < Q; i++) {
    scanf("%lld%lld%lld", &p, &x, &y);
    p--;
    y_sub_x = y - x;
    suma += x - a[p];
    if (0 < p && p < 2 * N - 1) {
      if (b_sub_a[p] >= 0) {
        sum_p -= b_sub_a[p];
        num_p--;
      } else {
        sum_m -= b_sub_a[p];
      }
      if (y_sub_x >= 0) {
        sum_p += y_sub_x;
        num_p++;
      } else {
        sum_m += y_sub_x;
      }
      r = erase_AVL(b_sub_a[p], t);
      insert_AVL(y_sub_x, 1, t);
    }
    a[p] = x;
    b[p] = y;
    b_sub_a[p] = y_sub_x;
    if (num_p % 2 == 0) {
      ans = suma + sum_p;
    } else {
      if (num_p < N - 2) {
        ans = suma + sum_p +
              max(-next_smallest_AVL(-1, t)->key, next_largest_AVL(0, t)->key);
      } else {
        ans = suma + sum_p - next_smallest_AVL(-1, t)->key;
      }
    }
    printf("%lld\n", ans);
  }
  return 0;
}
