#include <cstdio>
#include <algorithm>
#include <vector>
#include <set>
using namespace std;

int main() {
        int n, q;
        scanf("%d%d", &n, &q);
        n = 2 * n;
        vector<long long> a(n), b(n);
        for (int i = 0; i < n; i ++) scanf("%lld", &a[i]);
        for (int i = 0; i < n; i ++) scanf("%lld", &b[i]);
        multiset<long long> positive, negative;
        long long psum = 0, nsum = 0;
        for (int i = 0; i < n; i ++) {
                if (i == 0 || i == n - 1) psum += a[i];
                else {
                        long long c = a[i] - b[i];
                        if (c >= 0) positive.insert(c), psum += a[i];
                        else negative.insert(- c), nsum += b[i];
                }
        }
        while (q --) {
                long long p, x, y;
                scanf("%lld%lld%lld", &p, &x, &y); p --;
                if (p == 0 || p == n - 1) psum -= a[p], psum += x;
                else {
                        long long c = a[p] - b[p];
                        if (c >= 0) positive.erase(positive.find(c)), psum -= a[p];
                        else negative.erase(negative.find(-c)), nsum -= b[p];
                        long long z = x - y;
                        if (z >= 0) positive.insert(z), psum += x;
                        else negative.insert(-z), nsum += y;
                }
                a[p] = x, b[p] = y;
                long long ans;
                if (positive.size() % 2 == 0) ans = psum + nsum;
                else ans = psum + nsum - min(*positive.begin(), *negative.begin());
                printf("%lld\n", ans);
        }
        return 0;
}
