#include <bits/stdc++.h>
using namespace std;

int main(){
    long long i, j, k;
    long long N, Q;
    cin >> N >> Q;
    vector<long long> a(2*N), b(2*N);
    for(i=0; i<2*N; i++) cin >> a[i];
    for(i=0; i<2*N; i++) cin >> b[i];
    long long asum = 0;
    for(i=0; i<2*N; i++) asum += a[i];
    priority_queue<long long> neg;
    priority_queue<long long, vector<long long>, greater<long long>> pos;
    long long psum = 0, np = 0;
    for(i=1; i<2*N-1; i++){
        if(a[i] < b[i]){
            pos.push(b[i] - a[i]);
            psum += b[i] - a[i];
            np += 1;
        }else{
            neg.push(b[i] - a[i]);
        }
    }
    map<long long, long long> del;

    for(i=0; i<Q; i++){
        long long p, x, y;
        cin >> p >> x >> y;
        p -= 1;
        asum += x - a[p];
        long long prev = b[p] - a[p];
        long long now = y - x;
        a[p] = x;
        b[p] = y;

        if(0 < p && p < 2*N-1){
            if(prev > 0){
                psum -= prev;
                np -= 1;
            }
            if(now > 0){
                psum += now;
                np += 1;
                pos.push(now);
            }else{
                neg.push(now);
            }
            if(!pos.empty() && prev == pos.top()){
                pos.pop();
                while(!pos.empty() && del[pos.top()] > 0){
                    del[pos.top()] -= 1;
                    pos.pop();
                }
            }else if(!neg.empty() && prev == neg.top()){
                neg.pop();
                while(!neg.empty() && del[neg.top()] > 0){
                    del[neg.top()] -= 1;
                    neg.pop();
                }
            }else{
                del[prev] += 1;
            }
        }

        long long ans;
        if(np % 2 == 0){
            ans = asum + psum;
        }else{
            ans = asum + psum + max(-pos.top(), neg.top());
        }
        cout << ans << endl;
    }
    return 0;
}
