#include <algorithm>
#include <set>
#include <iostream>
using namespace std;
int main() {
    int n, q; cin >> n >> q;
    int a[2*n], b[2*n];
    long long asum = 0;
    for (int i = 0; i < 2*n; i++) cin >> a[i], asum += a[i];
    multiset<int> ds;
    for (int i = 0; i < 2*n; i++) {
        cin >> b[i];
        if (0 < i && i < 2*n-1) ds.insert(b[i] - a[i]);
    }
    long long dsum = 0;
    auto it = ds.lower_bound(1);
    int c = 0;
    for (auto it2 = it; it2 != ds.end(); it2++) {
        c++;
        dsum += *it2;
    }
    while (q--) {
        int i, x, y; cin >> i >> x >> y;
        i--;
        if (0 < i && i < 2*n-1) {
            ds.erase(ds.find(b[i] - a[i]));
            if (b[i] - a[i] > 0) { dsum -= b[i] - a[i]; c--; }
        }
        asum += x - a[i];
        a[i] = x; b[i] = y;
        if (0 < i && i < 2*n-1) {
            ds.insert(b[i] - a[i]);
            if (b[i] - a[i] > 0) { dsum += b[i] - a[i]; c++; }
        }
        long long ans = asum + dsum;
        if (c % 2) {
            it = ds.lower_bound(1);
            if (it != ds.begin() && *it + *prev(it) > 0)
                ans += *prev(it);
            else
                ans -= *it;
        }
        cout << ans << endl;
    }
}
