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

typedef long long ll;

int N, Q;
ll A[200010], B[200010];
ll ans;
int cnt;
multiset<ll> ms;

int main()
{
    cin >> N >> Q;
    for(int i = 0; i < N * 2; i++)cin >> A[i];
    for(int i = 0; i < N * 2; i++)cin >> B[i];

    for(int i = 1; i < N * 2 - 1; i++)
    {
        if(A[i] > B[i])
        {
            ans += A[i];
            cnt++;
        }
        else
        {
            ans += B[i];
        }
        ms.insert(abs(A[i] - B[i]));
    }

    for(int i = 0; i < Q; i++)
    {
        int id;
        ll a, b;
        cin >> id >> a >> b;
        if(id == 1 || id == 2 * N)
        {
            A[id - 1] = a;
            B[id - 1] = b;
        }
        else
        {
            cnt -= (A[id - 1] > B[id - 1]);
            cnt += (a > b);
            ans += -max(A[id - 1], B[id - 1]) + max(a, b);
            ms.erase(ms.lower_bound(abs(A[id - 1] - B[id - 1])));
            ms.insert(abs(a - b));
            A[id - 1] = a;
            B[id - 1] = b;
        }
        if(cnt % 2 == 0)cout << ans + A[0] + A[N * 2 - 1] << endl;
        else cout << ans - (*ms.begin()) + A[0] + A[2 * N - 1] << endl;
    }
}
