//Be Name Khoda
//no comment...
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
template <typename T> using ordered_set =  tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
template <typename T> using ordered_multiset =  tree<T, null_type, less_equal<T>, rb_tree_tag, tree_order_statistics_node_update>;
template <typename T> using mordered_multiset =  tree<T, null_type, greater_equal<T>, rb_tree_tag, tree_order_statistics_node_update>;
typedef long long ll;
typedef long double ld;
const ll MOD = (int)1e9 + 7;
const ll MAXN = (ll)1e6 + 7;
const int infint = (int)1e9;
const ll inf = (ll)1e18;
ll a[MAXN], b[MAXN], even[MAXN], odd[MAXN];
int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0); cout.tie(0);
	ll n, m, q;
	cin >> n >> m >> q;
	for (int i = 0; i < n; i++)
		cin >> a[i];
	for (int i = 0; i < m; i++)
		cin >> b[i];
	ll sum = 0;
	for (int i = 0; i < n; i++)
		if(i % 2)
			sum -= a[i];
	else
		sum += a[i];

	vector<ll> v;
	ll csum = 0;
	for (int i = 0; i < n; i++)
		if(i % 2 == 0)
			csum += b[i];
		else
			csum -= b[i];
	v.push_back(csum);
	for (int i = n; i < m; i++)
	{
		csum -= b[i - n];
		csum *= -1;
		if((n - 1) % 2 == 0)
			csum += b[i];
		else
			csum -= b[i];
		v.push_back(csum);
	}
	ll le = 0, re = v.size();
		while(re - le > 1)
		{
			ll mid = (le + re) >> 1;
			if(abs(sum - v[mid]) <= abs(sum - v[mid - 1]))
				le = mid;
			else
				re = mid;
		}
		cout << abs(sum - v[le]) << "\n";
	sort(v.begin(), v.end());
	for (int i = 0; i < q; i++)
	{
		ll l, r, x;
		cin >> l >> r >> x;
		l--, r--;
		ll odd = (r - l + 1) / 2, even = (r - l + 1) / 2;
		if((r - l + 1) % 2)
		{
			if(l % 2 == 0)
				even++;
			else
				odd++;
		}
		sum += (even - odd) * x;
		ll le = 0, re = v.size();
		while(re - le > 1)
		{
			ll mid = (le + re) >> 1;
			if(abs(sum - v[mid]) <= abs(sum - v[mid - 1]))
				le = mid;
			else
				re = mid;
		}
		cout << abs(sum - v[le]) << "\n";
	}
}


//Be Name Khoda
//no comment...
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
template <typename T> using ordered_set =  tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
template <typename T> using ordered_multiset =  tree<T, null_type, less_equal<T>, rb_tree_tag, tree_order_statistics_node_update>;
template <typename T> using mordered_multiset =  tree<T, null_type, greater_equal<T>, rb_tree_tag, tree_order_statistics_node_update>;
typedef long long ll;
typedef long double ld;
const ll MOD = (int)1e9 + 7;
const ll MAXN = (ll)1e6 + 7;
const int infint = (int)1e9;
const ll inf = (ll)1e18;
ll a[MAXN], b[MAXN], even[MAXN], odd[MAXN];
int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0); cout.tie(0);
	ll n, m, q;
	cin >> n >> m >> q;
	for (int i = 0; i < n; i++)
		cin >> a[i];
	for (int i = 0; i < m; i++)
		cin >> b[i];
	ll sum = 0;
	for (int i = 0; i < n; i++)
		if(i % 2)
			sum -= a[i];
	else
		sum += a[i];

	vector<ll> v;
	ll csum = 0;
	for (int i = 0; i < n; i++)
		if(i % 2 == 0)
			csum += b[i];
		else
			csum -= b[i];
	v.push_back(csum);
	for (int i = n; i < m; i++)
	{
		csum -= b[i - n];
		csum *= -1;
		if((n - 1) % 2 == 0)
			csum += b[i];
		else
			csum -= b[i];
		v.push_back(csum);
	}
	sort(v.begin(), v.end());
	ll st1 = lower_bound(v.begin(), v.end(), sum) - v.begin();
	ll mn = 1e18;
	if(st1 != v.size())
		mn = min(mn, abs(sum - v[st1]));
	if(st1 != 0)
		mn = min(mn, abs(sum - v[st1 - 1]));
	cout << mn << "\n";
	for (int i = 0; i < q; i++)
	{
		ll l, r, x;
		cin >> l >> r >> x;
		l--, r--;
		ll odd = (r - l + 1) / 2, even = (r - l + 1) / 2;
		if((r - l + 1) % 2)
		{
			if(l % 2 == 0)
				even++;
			else
				odd++;
		}
		sum += (even - odd) * x;
		ll st1 = lower_bound(v.begin(), v.end(), sum) - v.begin();
		ll mn = 1e18;
		if(st1 != v.size())
			mn = min(mn, abs(sum - v[st1]));
		if(st1 != 0)
			mn = min(mn, abs(sum - v[st1 - 1]));
		cout << mn << "\n";
	}
}


//Be Name Khoda
//no comment...
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
template <typename T> using ordered_set =  tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
template <typename T> using ordered_multiset =  tree<T, null_type, less_equal<T>, rb_tree_tag, tree_order_statistics_node_update>;
template <typename T> using mordered_multiset =  tree<T, null_type, greater_equal<T>, rb_tree_tag, tree_order_statistics_node_update>;
typedef long long ll;
typedef long double ld;
const ll MOD = (int)1e9 + 7;
const ll MAXN = (ll)1e6 + 7;
const int infint = (int)1e9;
const ll inf = (ll)1e18;
ll a[MAXN], b[MAXN], even[MAXN], odd[MAXN];
int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0); cout.tie(0);
	ll n, m, q;
	cin >> n >> m >> q;
	for (int i = 0; i < n; i++)
		cin >> a[i];
	for (int i = 0; i < m; i++)
		cin >> b[i];
	ll sum = 0;
	for (int i = 0; i < n; i++)
		if(i % 2)
			sum -= a[i];
	else
		sum += a[i];

	vector<ll> v;
	ll csum = 0;
	for (int i = 0; i < n; i++)
		if(i % 2 == 0)
			csum += b[i];
		else
			csum -= b[i];
	v.push_back(csum);
	for (int i = n; i < m; i++)
	{
		csum -= b[i - n];
		csum *= -1;
		if((n - 1) % 2 == 0)
			csum += b[i];
		else
			csum -= b[i];
		v.push_back(csum);
	}
	sort(v.begin(), v.end());
	ll le = 0, re = v.size();
		while(re - le > 1)
		{
			ll mid = (le + re) >> 1;
			if(abs(sum - v[mid]) <= abs(sum - v[mid - 1]))
				le = mid;
			else
				re = mid;
		}
		cout << abs(sum - v[le]) << "\n";
	for (int i = 0; i < q; i++)
	{
		ll l, r, x;
		cin >> l >> r >> x;
		l--, r--;
		ll odd = (r - l + 1) / 2, even = (r - l + 1) / 2;
		if((r - l + 1) % 2)
		{
			if(l % 2 == 0)
				even++;
			else
				odd++;
		}
		sum += (even - odd) * x;
		ll le = 0, re = v.size();
		while(re - le > 1)
		{
			ll mid = (le + re) >> 1;
			if(abs(sum - v[mid]) <= abs(sum - v[mid - 1]))
				le = mid;
			else
				re = mid;
		}
		cout << abs(sum - v[le]) << "\n";
	}
}


#pragma GCC optimize("Ofast")
#pragma GCC optimize ("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")

#include <bits/stdc++.h>
#include <ext/rope>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace std;
using namespace __gnu_cxx;
using namespace __gnu_pbds;

#define int long long
#define add push_back
#define rem pop_back
#define F first
#define S second

#define ALL( x ) x.begin(), x.end()
#define SORT( x ) sort(ALL(x))
#define REV( x ) reverse(ALL(x))
#define DEBUG( x ) cout << #x << " " << x << endl;

#define forn( i, a, b ) for(int i = a; i <= b; i++)
#define gcd( a, b ) __gcd(a, b)
#define lcm( a, b ) ((a)*((b)/gcd(a,b)))

template < typename T1, typename T2 >
auto max( T1 a, T2 b ) {
	auto max = a > b ? a : b;
	return max;
}

template < typename T1, typename T2 >
auto min( T1 a, T2 b ) {
	auto min = a < b ? a : b;
	return min;
}

template < typename T1, typename T2 >
void updmax( T1 & a, T2 b ) { a = a > b ? a : b; }

template < typename T1, typename T2 >
void updmin( T1 & a, T2 b ) { a = a < b ? a : b; }

int px[] = { 1, -1, 0, 0 };
int py[] = { 0, 0, -1, 1 };
int dx[] = { 1, 0, -1, 0, 1, 1, -1, -1 };
int dy[] = { 0, 1, 0, -1, 1, -1, 1, -1 };

const double EPS = 1e-9;
const double PI = acos( -1. );
const int mod = ( int ) 1e9 + 7;
long long inf = __INT64_MAX__;

tree<int, null_type, less_equal<int>, rb_tree_tag, tree_order_statistics_node_update> tr;

static const int MAXN = ( int ) 5e5 + 10;
static int a[MAXN], b[MAXN];

int n, m, k, q, x, y;
int res, ans, cnt;
string s, t;

set<int> st;

int query( ) {
	int res = inf;
	auto t = st.lower_bound( -x );
	if( t != st.end() )
		res = min( res, abs( *t + x ) );
	--t;
	if( t != st.end() )
		res = min( res, abs( x + *t ) );
	return res;
}

void solution( ) {
	cin >> n >> m >> q;
	for( int i = 1; i <= n; ++i )
		cin >> a[i];
	for( int i = 1; i <= m; ++i )
		cin >> b[i];
	for( int i = 1, j = 1; i <= n; ++i, j = -j )
		x += j * a[i];
	for( int i = 1, j = -1; i < n; ++i, j = -j )
		y += j * b[i];
	for( int i = n; i <= m; ++i ) {
		int j = ( n & 1 ) ? -1 : 1;
		y += j * b[i];
		st.insert( y );
		y += b[i - n + 1];
		y = -y;
	}
	cout << query() << endl;
	for( int i = 1; i <= q; ++i ) {
		int a, b, c;
		cin >> a >> b >> c;
		if( ( b - a ) % 2 == 1 );
		else {
			if( b & 1 ) x += c;
			else x -= c;
		}
		cout << query() << endl;
	}
}

int32_t main( ) {

	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);

	ios_base::sync_with_stdio( false );
	cin.tie( nullptr );
	cout.tie( nullptr );
	//cout.precision(15);

	int query = 1;
	// cin >> query;

	while( query-- ) solution();

	return 0;

}


#include <bits/stdc++.h>
#define pb push_back
#define ss second
#define ff first
#define all(x) x.begin(), x.end()
#define INF 3000000000000001 // 3e15
#define ll_max 9000000000000000000
#define PI 3.14159265358979323846L
#define fill(a, n, x) for(int i = 0; i < n; i++) a[i] = x;
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define db(args...) {string _ss = #args; replace(_ss.begin(), _ss.end(), ',' , ' '); stringstream ___s(_ss) ; debug(___s, args);}
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
typedef long long int ll;
typedef long double ld;
typedef pair<ll,ll> pll;
ll mod = 1000000007;
const ll N = 200001;
const ll M = 1;

struct point
{
    ll x, y;
};

void debug(stringstream &s) {}
template <typename T, typename... Args>
void debug(stringstream &s, T a, Args... args)
{
    string word;
    s >> word;
    cerr << word << " = " << a << endl;
    debug(s, args...);
}

ll fast_exp(ll x,ll n)
{
    if(n == 0) return 1;
    ll ans = 1;
    if( n % 2 == 0)
    {
         ans = fast_exp(x, n / 2);
         ans = ans * ans % mod;
    }
    else ans = fast_exp(x, n - 1) * x % mod;
    return ans;
}

ll gcd(ll a, ll b, ll& x, ll& y) {
    if (b == 0) {
        x = 1;
        y = 0;
        return a;
    }
    ll x1, y1;
    ll d = gcd(b, a % b, x1, y1);
    x = y1;
    y = x1 - y1 * (a / b);
    return d;
}

vector<int> p;
void SoE(int n)
{
    bool Primes[n + 1];
    Primes[0] = Primes[1] = 0;
    for(int i = 2; i < n + 1; i++)
        Primes[i] = 1;
    for(int i = 2; i * i <= n; i++)
    {
       if(Primes[i] == 1)
       {
           for(int j = i; i * j <= n; j++)
           {
               Primes[i * j] = 0;
           }
       }
    }
    for(int i = 2; i < n + 1; i++)
    {
        if(Primes[i])
        {
            p.push_back(i);
        }
    }
}

int main()
{
    fast;
    int _ = 1;
    //cin >> _;
    int test = 0;
    while(_--)
    {
        test++;
        ll n, m, x, y, ans = 0, k = 0, sum = 0, q;
        cin >> n >> m >> q;
        ll a[n], b[m];
        for(int i = 0; i < n; i++)
        {
            cin >> a[i];
            if(i % 2) sum -= a[i];
            else sum += a[i];
        }
        ll pre_odd[m + 1] = {}, pre_even[m + 1] = {};
        for(int i = 0; i < m; i++)
        {
            pre_odd[i + 1] = pre_odd[i];
            pre_even[i + 1] = pre_even[i];
            cin >> b[i];
            if(i % 2) pre_odd[i + 1] += b[i];
            else pre_even[i + 1] += b[i];
        }
        k = m - n;
        ll arr[k];
        for(int j = 0; j <= k; j++)
        {
            if(j % 2)
            {
                arr[j] = pre_odd[n + j] - pre_odd[j];
                arr[j] += - pre_even[n + j] + pre_even[j];
            }
            else {
                arr[j] = pre_even[n + j] - pre_even[j];
                arr[j] += - pre_odd[n + j] + pre_odd[j];
            }
        }
        sort(arr, arr + k + 1);
        do
        {
            ll l = 0, r = k, mid, sol = k + 1;
            while(l <= r)
            {
                mid = (l + r) / 2;
                if(arr[mid] >= sum)
                {
                    sol = mid;
                    r = mid - 1;
                }
                else l = mid + 1;
            }
            if(sol == k + 1) ans = abs(sum - arr[k]);
            else if(sol == 0) ans = abs(sum - arr[0]);
            else ans = min(abs(arr[sol - 1] - sum), abs(arr[sol] - sum));
            cout << ans << "\n";
            if(q == 0) break;
            ll z;
            cin >> x >> y >> z;
            if((y - x + 1) % 2)
            {
                if(x % 2) sum += z;
                else sum -= z;
            }
        } while(q--);
    }
    return 0;
}


#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
using namespace std;

const int N = 100005;

int i, n, m, q, a[N], b[N], l, r, x;
long long suma, sumb[N];
set<long long> S;

long long query(long long val) {
  long long ans = 1e18;
  auto it = S.lower_bound(val);
  if(it == S.end()) --it;
  ans = min(ans, abs(val - *it));
  if(it != S.begin()) {
    --it;
    ans = min(ans, abs(val - *it));
    ++it;
  }
  ++it;
  if(it != S.end()) ans = min(ans, abs(val - *it));
  return ans;
}

int main() {
  scanf("%d %d %d", &n, &m, &q);
  for(i = 1; i <= n; ++i) scanf("%d", a + i), suma += (i % 2 ? a[i] : -a[i]);
  for(i = 1; i <= m; ++i) scanf("%d", b + i);
  for(i = 1; i <= n; ++i) sumb[0] += (i % 2 ? b[i] : -b[i]);

  for(S.insert(sumb[0]), i = 1; i <= m - n; ++i) {
    sumb[i] = -(sumb[i - 1] - (i % 2 ? b[i] : -b[i]));
    if(n & 1) sumb[i] += b[i + n]; else sumb[i] -= b[i + n];
    S.insert(sumb[i]);
  }

  printf("%lld\n", query(suma));

  while(q--) {
    scanf("%d %d %d", &l, &r, &x);
    if((r - l + 1) & 1) {
      if(l & 1) suma += x;
      else suma -= x;
    }
    printf("%lld\n", query(suma));
  }

  return 0;
}


#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
using namespace std;

const int N = 100005;

int i, n, m, q, a[N], b[N], l, r, x;
long long suma, sumb[N];
set<long long> S;

long long query(long long val) {
  long long ans = 1e18;
  auto it = S.lower_bound(val);
  if(it == S.end()) --it;
  ans = min(ans, abs(val - *it));
  if(it != S.begin()) {
    --it;
    ans = min(ans, abs(val - *it));
    ++it;
  }
  ++it;
  if(it != S.end()) ans = min(ans, abs(val - *it));
  return ans;
}

int main() {
  scanf("%d %d %d", &n, &m, &q);
  for(i = 1; i <= n; ++i) scanf("%d", a + i), suma += (i % 2 ? a[i] : -a[i]);
  for(i = 1; i <= m; ++i) scanf("%d", b + i);
  for(i = 1; i <= n; ++i) sumb[0] += (i % 2 ? b[i] : -b[i]);

  for(S.insert(sumb[0]), i = 1; i <= m - n; ++i) {
    sumb[i] = -(sumb[i - 1] - b[i]);
    if(n & 1) sumb[i] += b[i + n]; else sumb[i] -= b[i + n];
    S.insert(sumb[i]);
  }

  printf("%lld\n", query(suma));

  while(q--) {
    scanf("%d %d %d", &l, &r, &x);
    if((r - l + 1) & 1) {
      if(l & 1) suma += x;
      else suma -= x;
    }
    printf("%lld\n", query(suma));
  }

  return 0;
}


#include <bits/stdc++.h>
#define mp make_pair
#define eb emplace_back
#define fi first
#define se second
using namespace std;
using cd = complex <double>;

const int mod = 1e9 + 7;//786433;//998244353;
const double Pi = acos(-1);

void Fastio()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
}

int n, m, q;
long long sum = 0, t;
long long b[100005];
vector <long long> g;

signed main()
{
	Fastio();
	cin >> n >> m >> q;
	for(int i = 1; i <= n; i++)
	{
		long long temp;
		cin >> temp;
		if(i & 1)
		{
			sum += temp;
		}
		else
		{
			sum -= temp;
		}
	}
	for(int i = 1; i <= m; i++)
	{
		cin >> b[i];
		if(i <= n)
		{
			if(i & 1)
			{
				t += b[i];
			}
			else
			{
				t -= b[i];
			}
		}
	}
	g.eb(t);
	for(int i = n + 1; i <= m; i++)
	{
		t -= b[i - n];
		t = -t;
		if(n & 1)
		{
			t += b[i];
		}
		else
		{
			t -= b[i];
		}
		g.eb(t);
	}
	sort(g.begin(), g.end());
	auto it = lower_bound(g.begin(), g.end(), sum);
	if(it != g.begin())
	{
		--it;
	}
	long long ans = 1e18;
	ans = min(ans, abs(sum - *it));
	it = lower_bound(g.begin(), g.end(), -sum);
	if(it == g.end())
	{
		--it;
	}
	ans = min(ans, abs(*it - sum));
	cout << ans << '\n';
	for(int i = 1; i <= q; i++)
	{
		int l, r;
		long long val;
		cin >> l >> r >> val;
		if((r - l + 1) & 1)
		{
			if(l & 1)
			{
				sum += val;
			}
			else
			{
				sum -= val;
			}
		}
		ans = 1e18;
		it = lower_bound(g.begin(), g.end(), sum);
		ans = min(ans, abs(sum - *it));
		if(it != g.begin())
		{
			--it;
		}
		ans = min(ans, abs(sum - *it));
		it = lower_bound(g.begin(), g.end(), -sum);
		if(it == g.end())
		{
			--it;
		}
		ans = min(ans, abs(*it - sum));
		cout << ans << '\n';
	}
}


#include <bits/stdc++.h>
#define mp make_pair
#define eb emplace_back
#define fi first
#define se second
using namespace std;
using cd = complex <double>;

const int mod = 1e9 + 7;//786433;//998244353;
const double Pi = acos(-1);

void Fastio()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
}

int n, m, q;
long long sum = 0, t;
long long b[100005];
vector <long long> g;

signed main()
{
	Fastio();
	cin >> n >> m >> q;
	for(int i = 1; i <= n; i++)
	{
		long long temp;
		cin >> temp;
		if(i & 1)
		{
			sum += temp;
		}
		else
		{
			sum -= temp;
		}
	}
	for(int i = 1; i <= m; i++)
	{
		cin >> b[i];
		if(i <= n)
		{
			if(i & 1)
			{
				t += b[i];
			}
			else
			{
				t -= b[i];
			}
		}
	}
	g.eb(t);
	for(int i = n + 1; i <= m; i++)
	{
		t -= b[i - n];
		t = -t;
		if(n & 1)
		{
			t += b[i];
		}
		else
		{
			t -= b[i];
		}
		g.eb(t);
	}
	sort(g.begin(), g.end());
	long long ans = 1e18;
	auto it = lower_bound(g.begin(), g.end(), sum);
	if(it == g.end())
	{
		--it;
	}
	ans = min(ans, abs(sum - *it));
	if(it != g.begin())
	{
		--it;
	}
	ans = min(ans, abs(sum - *it));
	it = lower_bound(g.begin(), g.end(), -sum);
	if(it == g.end())
	{
		--it;
	}
	ans = min(ans, abs(*it - sum));
	cout << ans << '\n';
	for(int i = 1; i <= q; i++)
	{
		int l, r;
		long long val;
		cin >> l >> r >> val;
		if((r - l + 1) & 1)
		{
			if(l & 1)
			{
				sum += val;
			}
			else
			{
				sum -= val;
			}
		}
		ans = 1e18;
		it = lower_bound(g.begin(), g.end(), sum);
		if(it == g.end())
		{
			--it;
		}
		ans = min(ans, abs(sum - *it));
		if(it != g.begin())
		{
			--it;
		}
		ans = min(ans, abs(sum - *it));
		it = lower_bound(g.begin(), g.end(), -sum);
		if(it == g.end())
		{
			--it;
		}
		ans = min(ans, abs(*it - sum));
		cout << ans << '\n';
	}
}


#include <bits/stdc++.h>
#define mp make_pair
#define eb emplace_back
#define fi first
#define se second
using namespace std;
using cd = complex <double>;

const int mod = 1e9 + 7;//786433;//998244353;
const double Pi = acos(-1);

void Fastio()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
}

int n, m, q;
long long sum = 0, t;
long long b[100005];
vector <long long> g;

signed main()
{
	Fastio();
	cin >> n >> m >> q;
	for(int i = 1; i <= n; i++)
	{
		long long temp;
		cin >> temp;
		if(i & 1)
		{
			sum += temp;
		}
		else
		{
			sum -= temp;
		}
	}
	for(int i = 1; i <= m; i++)
	{
		cin >> b[i];
		if(i <= n)
		{
			if(i & 1)
			{
				t += b[i];
			}
			else
			{
				t -= b[i];
			}
		}
	}
	g.eb(t);
	for(int i = n + 1; i <= m; i++)
	{
		t -= b[i - n];
		t = -t;
		if(n & 1)
		{
			t += b[i];
		}
		else
		{
			t -= b[i];
		}
		g.eb(t);
	}
	sort(g.begin(), g.end());
	auto it = lower_bound(g.begin(), g.end(), sum);
	if(it != g.begin())
	{
		--it;
	}
	long long ans = 1e18;
	ans = min(ans, abs(sum - *it));
	it = lower_bound(g.begin(), g.end(), -sum);
	if(it == g.end())
	{
		--it;
	}
	ans = min(ans, abs(*it - sum));
	cout << ans << '\n';
	for(int i = 1; i <= q; i++)
	{
		int l, r;
		long long val;
		cin >> l >> r >> val;
		if((r - l + 1) & 1)
		{
			if(l & 1)
			{
				sum += val;
			}
			else
			{
				sum -= val;
			}
		}
		ans = 1e18;
		it = lower_bound(g.begin(), g.end(), sum);
		if(it == g.end())
		{
			--it;
		}
		ans = min(ans, abs(sum - *it));
		if(it != g.begin())
		{
			--it;
		}
		ans = min(ans, abs(sum - *it));
		it = lower_bound(g.begin(), g.end(), -sum);
		if(it == g.end())
		{
			--it;
		}
		ans = min(ans, abs(*it - sum));
		cout << ans << '\n';
	}
}


#include<bits/stdc++.h>
#define ll long long
using namespace std;
const ll inf=1e18;
vector<ll> v;
int sz;
ll query(ll ad) {
    int p=lower_bound(v.begin(),v.end(),-ad)-v.begin();
    p=min(p,sz-1);
    ll ans=inf;
    for(int j=max(0,p-3);j<=min(p+3,sz-1);j++){
        ans=min(ans,abs(v[j]+ad));
    }
    return ans;
}
int main() {
    int n,m,q;
    cin>>n>>m>>q;
    ll a[n+1],b[m+1];
    for(int i=1;i<=n;i++)scanf("%lld",&a[i]);
    for(int i=1;i<=m;i++)scanf("%lld",&b[i]);

    ll sm[m+1];
    sm[0]=0;
    sm[1]=b[1];
    ll S=0;
    for(int i=1;i<=n;i++) {
        if(i&1)S+=a[i];
        else S-=a[i];
    }
    for(int i=2;i<=m;i++) {
        sm[i]=sm[i-2]+b[i]-b[i-1];
    }

    for(int i=n;i<=m;i++) {
        ll c=S-sm[i]-sm[i-n];
        if(n&1==0)c=S-sm[i-1]-sm[i-n]+b[i];
        v.push_back(c);
    }

    sort(v.begin(),v.end());

    ll ad=0;
    sz=v.size();

    printf("%lld\n",query(0));
    for(int i=0;i<q;i++) {
        int l,r;
        ll x;
        scanf("%d%d%lld",&l,&r,&x);

        ll ev=((r-(r&1)-l-(l&1))/2)+1;

        ll od=r-l+1-ev;
        ad+=(od-ev)*x;

        printf("%lld\n",query(ad));

    }

}


#include<bits/stdc++.h>
#define ll long long
using namespace std;
const ll inf=1e18;
vector<ll> v;
int sz;
ll query(ll ad) {
    int p=lower_bound(v.begin(),v.end(),-ad)-v.begin();
    p=min(p,sz-1);
    ll ans=inf;
    for(int j=max(0,p-3);j<=min(p+3,sz-1);j++){
        ans=min(ans,abs(v[j]+ad));
    }
    return ans;
}
int main() {
    int n,m,q;
    cin>>n>>m>>q;
    ll a[n+1],b[m+1];
    for(int i=1;i<=n;i++)scanf("%lld",&a[i]);
    for(int i=1;i<=m;i++)scanf("%lld",&b[i]);

    ll sm[m+1];
    sm[0]=0;
    sm[1]=b[1];
    ll S=0;
    for(int i=1;i<=n;i++) {
        if(i&1)S+=a[i];
        else S-=a[i];
    }
    for(int i=2;i<=m;i++) {
        sm[i]=sm[i-2]+b[i]-b[i-1];
    }

    for(int i=n;i<=m;i++) {
        ll c=S-sm[i]-sm[i-n];
        v.push_back(c);
    }

    sort(v.begin(),v.end());

    ll ad=0;
    sz=v.size();

    printf("%lld\n",query(0));
    for(int i=0;i<q;i++) {
        int l,r;
        ll x;
        scanf("%d%d%lld",&l,&r,&x);

        ll ev=((r-(r&1)-l-(l&1))/2)+1;

        ll od=r-l+1-ev;
        ad+=(od-ev)*x;

        printf("%lld\n",query(ad));

    }

}


#include<bits/stdc++.h>
#define ll long long
using namespace std;
const ll inf=1e18;
vector<ll> v;
int sz;
ll query(ll ad) {
    int p=lower_bound(v.begin(),v.end(),-ad)-v.begin();
    p=min(p,sz);
    ll ans=inf;
    for(int j=max(0,p-3);j<=min(p+3,sz-1);j++){
        ans=min(ans,abs(v[j]+ad));
    }
    return ans;
}
int main() {
    int n,m,q;
    cin>>n>>m>>q;
    ll a[n+1],b[m+1];
    for(int i=1;i<=n;i++)scanf("%lld",&a[i]);
    for(int i=1;i<=m;i++)scanf("%lld",&b[i]);

    ll sm[m+1];
    sm[0]=0;
    sm[1]=b[1];
    ll S=0;
    for(int i=1;i<=n;i++) {
        if(i&1)S+=a[i];
        else S-=a[i];
    }
    for(int i=2;i<=m;i++) {
        sm[i]=sm[i-2]+b[i]-b[i-1];
    }

    for(int i=n;i<=m;i++) {
        ll c=S-sm[i]-sm[i-n];
        v.push_back(c);
    }

    sort(v.begin(),v.end());

    ll ad=0;
    sz=v.size();
    printf("%lld\n",query(0));
    for(int i=0;i<q;i++) {
        int l,r;
        ll x;
        scanf("%d%d%lld",&l,&r,&x);

        ll ev=((r-(r&1)-l-(l&1))/2)+1;

        ll od=r-l+1-ev;
        ad+=(od-ev)*x;

        printf("%lld\n",query(ad));

    }

}


#include<bits/stdc++.h>
#define ll long long
using namespace std;
const ll inf=1e18;
vector<ll> v;
int sz;
ll query(ll ad) {
    int p=lower_bound(v.begin(),v.end(),-ad)-v.begin();
    p=min(p,sz-1);
    ll ans=inf;
    for(int j=max(0,p-3);j<=min(p+3,sz-1);j++){
        ans=min(ans,abs(v[j]+ad));
    }
    return ans;
}
int main() {
    int n,m,q;
    cin>>n>>m>>q;
    ll a[n+1],b[m+1];
    for(int i=1;i<=n;i++)scanf("%lld",&a[i]);
    for(int i=1;i<=m;i++)scanf("%lld",&b[i]);

    ll sm[m+1];
    sm[0]=0;
    sm[1]=b[1];
    ll S=0;
    for(int i=1;i<=n;i++) {
        if(i&1)S+=a[i];
        else S-=a[i];
    }
    for(int i=2;i<=m;i++) {
        sm[i]=sm[i-2]+b[i]-b[i-1];
    }

    for(int i=n;i<=m;i++) {
        ll c=S-sm[i]-sm[i-n];
        if(n%2==0)c=S+sm[i]-sm[i-n];
        v.push_back(c);
    }

    sort(v.begin(),v.end());

    ll ad=0;
    sz=v.size();

    printf("%lld\n",query(0));
    for(int i=0;i<q;i++) {
        int l,r;
        ll x;
        scanf("%d%d%lld",&l,&r,&x);

        ll ev=((r-(r&1)-l-(l&1))/2)+1;

        ll od=r-l+1-ev;
        ad+=(od-ev)*x;

        printf("%lld\n",query(ad));

    }

}


#include <algorithm>
#include <cassert>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <functional>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <string>
#include <vector>

using namespace std;
using ll = long long;

void Main();

signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  cout << fixed << setprecision(10);
#ifdef LOCAL
  freopen("in.txt", "r", stdin);
  freopen("out.txt", "w", stdout);
#endif
  Main();
#ifdef LOCAL
  cout << "\nTime: " << (int)ceil((double)1000 * clock() / CLOCKS_PER_SEC) << " ms";
#endif
}

int n, m, q;
vector<int> a, b;
ll sum_a = 0;
set<ll> sum_b;

void calc_sum_b() {
  vector<int> even, odd;
  for (int i = 0; i < m; i++) {
    if (i % 2 == 0) {
      even.push_back(b[i]);
    } else {
      odd.push_back(b[i]);
    }
  }
  vector<ll> pref_even(even.size() + 1, 0ll);
  for (int i = 0; i < (int)even.size(); i++) {
    pref_even[i + 1] = pref_even[i] + even[i];
  }
  vector<ll> pref_odd(odd.size() + 1, 0ll);
  for (int i = 0; i < (int)odd.size(); i++) {
    pref_odd[i + 1] = pref_odd[i] + odd[i];
  }
  int cnt_even = (n + 1) / 2;
  int cnt_odd = n - cnt_even;
  for (int i = 0; i + cnt_even - 1 < (int)even.size() && i + cnt_odd - 1 < (int)odd.size(); i++) {
    ll cur = 0;
    cur += pref_even[i + cnt_even] - pref_even[i];
    cur -= pref_odd[i + cnt_odd] - pref_odd[i];
    sum_b.insert(cur);
  }
  for (int i = 0; i + 1 + cnt_odd - 1 < (int)even.size() && i + cnt_even - 1 < (int)odd.size(); i++) {
    ll cur = 0;
    cur += pref_odd[i + cnt_even] - pref_odd[i];
    cur -= pref_even[i + 1 + cnt_odd] - pref_even[i + 1];
    sum_b.insert(cur);
  }
}

void update(int L, int R, ll x) {
  if (L % 2 == 0) {
    if (R % 2 == 1) {
      sum_a += x;
    }
  } else {
    if (R % 2 == 0) {
      sum_a -= x;
    }
  }
}

ll get() {
  auto it = sum_b.lower_bound(sum_a);
  ll ans = 1e18;
  if (it != sum_b.end()) {
    ans = min(ans, *it - sum_a);
  }
  if (it != sum_b.begin()) {
    it--;
    ans = min(ans, sum_a - *it);
  }
  return ans;
}

void Main() {
  cin >> n >> m >> q;
  a.resize(n);
  for (auto &el : a) {
    cin >> el;
  }
  b.resize(m);
  for (auto &el : b) {
    cin >> el;
  }
  for (int i = 0; i < n; i++) {
    if (i % 2 == 0) {
      sum_a += a[i];
    } else {
      sum_a -= a[i];
    }
  }
  calc_sum_b();
  // cout << "sum_b = ";
  // for (auto el : sum_b) {
  //   cout << el << ' ';
  // }
  // cout << endl;
  // cout << "sum_a = " << sum_a << endl;
  cout << get() << '\n';
  while (q--) {
    int L, R;
    ll x;
    cin >> L >> R >> x;
    L--;
    update(L, R, x);
    // cout << "sum_a = " << sum_a << endl;
    cout << get() << '\n';
  }
}


#pragma GCC optimize(2)
#include<bits/stdc++.h>
#define read(a) scanf("%d", &a)
#define readl(a) scanf("%lld", &a)
#define reads(a) scanf("%s", a)
#define readc(a) scanf("%c", &a)
#define debug(a, b) printf("%s = %d\n", a, b)
#define debug1(a, i, b) printf("%s[%d] = %d", a, i, b)
#define debug2(a, c, n) for(int i = 1; i <= n; i++) printf("%s[%d] = %d%c", a, i, c[i], i == n ? '\n':' ')
#define debug3(a, n, m, c) for(int i = 1; i <= n; i++) for(int j = 1; j <= m; j++) printf("%s[%d][%d] = %d%c", a, i, j, c[i][j], j == m ? '\n' : ' ')
#define show(a) putchar(a)
#define pb push_back
#define _rand mt19937 RAND(time(0))
#define mem(a) memset(a, 0, sizeof(a))
#define Buff ios::sync_with_stdio(false)
typedef long long ll;
using namespace std;
const ll INF = 1e18+ 7;
const int N = 2e5 + 7;
const int M = 1e6 + 7;

ll sum = 0;
ll a[N], b[N], c[N];
int n, m;

ll getAns()
{
    ll ans = INF;
    int pos = lower_bound(c + 1, c + m - n + 1, -sum) - c;
    if(pos == 1) ans = abs(sum + c[pos]);
    else         ans = min(abs(sum + c[pos]), abs(sum + c[pos - 1]));

    return ans;
}

signed main()
{
#ifndef ONLINE_JUDGE
//	freopen("in.txt", "r", stdin);
//	freopen("out.txt", "w", stdout);
	long _begin_time = clock();
#endif
    Buff;
    ll x; int q;
    cin >> n >> m >> q;
    for(int i = 1; i <= n; i++)
    {
        cin >> a[i];
        sum += (i % 2 ? a[i] : -a[i]);
    }

    for(int i = 1; i <= m; i++)
    {
        cin >> x;
        b[i] = b[i - 1] + (i & 1 ? x : -x);
    }

    for(int i = 1; i <= m - n + 1; i++)
    {
        c[i] = b[i + n - 1] - b[i - 1];
        if(i & 1) c[i] *= -1ll;
    }

    sort(c + 1, c + 1 + m - n + 1);

    printf("%lld\n", getAns());

    while(q--)
    {
        int l, r;
        cin >> l >> r >> x;
        if(l == r)
            sum += (r & 1 ? x : -x);
        else if((r - l + 1) & 1)
            sum += (l & 1 ? x : -x);
        printf("%lld\n", getAns());
    }

#ifndef ONLINE_JUDGE
	long _end_time = clock();
	cout << "time= " <<  _end_time - _begin_time;
#endif
    return 0;
}


	#pragma GCC optimize("Ofast")

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

#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define pop_b pop_back
#define pf push_front
#define pop_f pop_front
#define mt make_tuple
#define eb emplace_back
#define sf(x) sizeof(x)
#define len(x) x.length()
#define sz(x) x.size()
#define fastio() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)

#define LB(x,v) (lower_bound(x.begin(),x.end(),v)-x.begin())
#define UB(x,v) (upper_bound(x.begin(),x.end(),v)-x.begin())
typedef long long ll;
typedef pair<ll,ll> ii;
typedef long double ld;
typedef vector<int> vi;
typedef vector<set<ll>> vset;
typedef vector<ll> vl;
typedef vector<ld> vd;
typedef deque<ll> dql;
typedef deque<int> dqi;
typedef unsigned long long ull;
typedef tuple<int,int,int> State;

#define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }
void err(istream_iterator<string> it) {}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
	cerr << *it << " = " << a << endl;
	err(++it, args...);
}
#define vmax(type)   std::numeric_limits<type>::max()
#define vmin(type)   std::numeric_limits<type>::min()
#define each(a,x) for( auto &a:(x))
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define repr(i, n) for (ll i = (n) - 1; i >= 0; i--)
#define rep2(i, l, r) for (ll i = (l); i < (r); i++)
#define rep2r(i, l, r) for (ll i = (r) - 1; i >= (l); i--)
#define range(a) a.begin(), a.end()
#define deb(x) cout<<#x<<" "<<x<<endl;
#define cini(i) int i; cin>>i;
#define cinll(l) ll l; cin>>l;
#define cinll2(l, z) ll l, z; cin>>l>>z;
#define cinll3(l, z, x) ll l, z, x; cin>>l>>z>>x;
#define cinai(a, n) vi a(n); rep(i, n) { cin>>a[i]; }
#define cinal(a, n) vl a(n); rep(i, n) { cin>>a[i]; }
#define coutai(a, n) rep(i, n) { cout<<a[i]<<" "; } ent;
#define coutal(a, n) rep(i, n) { cout<<a[i]<<" "; } ent;
#define ent cout<<endl;
#define resize_vec(a) a.resize(unique(a.begin(), a.end()) - a.begin());
#define ms(dp, x) memset(dp, x, sf(dp))

// const long long MAX_SIZE = 1000000;
// vector<long long >isprime(MAX_SIZE , true);
// vector<long long >prime;
// vector<long long >SPF(MAX_SIZE);

// // function generate all prime number less then N in O(n)
// void manipulated_seive(ll N)
// {
//     isprime[0] = isprime[1] = false ;
//     for (ll i=2; i<N ; i++)
//     {
//         if (isprime[i])
//         {
//             prime.push_back(i);
//             SPF[i] = i;
//         }
//         for (ll j=0;j < prime.size() && i*prime[j] < N && prime[j] <= SPF[i];j++)
//         {
//             isprime[i*prime[j]]=false;
//             SPF[i*prime[j]] = prime[j] ;
//         }
//     }
// }
ll mod = 1e9 + 7;

ll powm(ll a, ll b, ll mod) {
	ll res=1;
	while(b) {
		if(b&1)
			res=(res*a)%mod;
		a=(a*a)%mod;
		b>>=1;
	}
	return res;
}
bool sortinrev(const pair<int,int> &a, const pair<int,int> &b)
{
       return (a.first > b.first);
}

void solve()
{
	ll n, m, q;
	cin>>n>>m>>q;
	cinal(a, n);
	cinal(b, m);
	ll sum = 0, sum1 = 0;
	rep(i, n) sum += a[i] * (i%2 ? -1 :1);
	rep(i, n) sum1 += b[i] * (i%2 ? -1: 1);
	vl v;
	// error(sum, sum1);
	v.pb(sum - sum1);
	rep2(i, n, m){
		ll tmp = (-1) * (b[i] + b[i - n]);
		// error(tmp);
		sum1 += tmp;
		sum1 *= -1;
		v.pb(sum - sum1);
	}
	sort(range(v));
	ll t1 = LB(v, 0);
	sum = 0;
	n = v.size();
	cout<<((ll)min({((t1 >= 0 and t1 <n) ? abs(v[t1]): 1e15), ((t1+1 >= 0 and t1+1 <n) ? abs(v[t1+1]): 1e15), ((t1-1 >= 0 and t1-1 <n) ? abs(v[t1-1]): 1e15)}))<<endl;
	while(q--){
		ll x, y, l;
		cin>>x>>y>>l;
		if(x%2){
			sum += (y%2 ? -1:0) * l;
		}
		else
			sum += (y%2 ? 1:0) * l;
		// error(sum);
		ll t11 = LB(v, sum);
		cout<<((ll)min({((t11 >= 0 and t11 <n) ? abs(v[t11]-sum): 1e15), ((t11+1 >= 0 and t11+1 <n) ? abs(v[t11+1]-sum): 1e15), ((t11-1 >= 0 and t11-1 <n) ? abs(v[t11-1]- sum): 1e15)}))<<endl;
	}
}

// #define _DEBUG 1
int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0), cout.tie(0);
	// cout << fixed << setprecision(15);

	int tc = 1;
	// cin>>tc;
	while(tc--)
	{
#ifdef _DEBUG
	int tt = clock();
#endif
		solve();

#ifdef _DEBUG
		cerr << "TIME = " << clock() - tt << endl;
		tt = clock();
#endif
	}
	return 0;
}


	#pragma GCC optimize("Ofast")

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

#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define pop_b pop_back
#define pf push_front
#define pop_f pop_front
#define mt make_tuple
#define eb emplace_back
#define sf(x) sizeof(x)
#define len(x) x.length()
#define sz(x) x.size()
#define fastio() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)

#define LB(x,v) (lower_bound(x.begin(),x.end(),v)-x.begin())
#define UB(x,v) (upper_bound(x.begin(),x.end(),v)-x.begin())
typedef long long ll;
typedef pair<ll,ll> ii;
typedef long double ld;
typedef vector<int> vi;
typedef vector<set<ll>> vset;
typedef vector<ll> vl;
typedef vector<ld> vd;
typedef deque<ll> dql;
typedef deque<int> dqi;
typedef unsigned long long ull;
typedef tuple<int,int,int> State;

#define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }
void err(istream_iterator<string> it) {}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
	cerr << *it << " = " << a << endl;
	err(++it, args...);
}
#define vmax(type)   std::numeric_limits<type>::max()
#define vmin(type)   std::numeric_limits<type>::min()
#define each(a,x) for( auto &a:(x))
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define repr(i, n) for (ll i = (n) - 1; i >= 0; i--)
#define rep2(i, l, r) for (ll i = (l); i < (r); i++)
#define rep2r(i, l, r) for (ll i = (r) - 1; i >= (l); i--)
#define range(a) a.begin(), a.end()
#define deb(x) cout<<#x<<" "<<x<<endl;
#define cini(i) int i; cin>>i;
#define cinll(l) ll l; cin>>l;
#define cinll2(l, z) ll l, z; cin>>l>>z;
#define cinll3(l, z, x) ll l, z, x; cin>>l>>z>>x;
#define cinai(a, n) vi a(n); rep(i, n) { cin>>a[i]; }
#define cinal(a, n) vl a(n); rep(i, n) { cin>>a[i]; }
#define coutai(a, n) rep(i, n) { cout<<a[i]<<" "; } ent;
#define coutal(a, n) rep(i, n) { cout<<a[i]<<" "; } ent;
#define ent cout<<endl;
#define resize_vec(a) a.resize(unique(a.begin(), a.end()) - a.begin());
#define ms(dp, x) memset(dp, x, sf(dp))

// const long long MAX_SIZE = 1000000;
// vector<long long >isprime(MAX_SIZE , true);
// vector<long long >prime;
// vector<long long >SPF(MAX_SIZE);

// // function generate all prime number less then N in O(n)
// void manipulated_seive(ll N)
// {
//     isprime[0] = isprime[1] = false ;
//     for (ll i=2; i<N ; i++)
//     {
//         if (isprime[i])
//         {
//             prime.push_back(i);
//             SPF[i] = i;
//         }
//         for (ll j=0;j < prime.size() && i*prime[j] < N && prime[j] <= SPF[i];j++)
//         {
//             isprime[i*prime[j]]=false;
//             SPF[i*prime[j]] = prime[j] ;
//         }
//     }
// }
ll mod = 1e9 + 7;

ll powm(ll a, ll b, ll mod) {
	ll res=1;
	while(b) {
		if(b&1)
			res=(res*a)%mod;
		a=(a*a)%mod;
		b>>=1;
	}
	return res;
}
bool sortinrev(const pair<int,int> &a, const pair<int,int> &b)
{
       return (a.first > b.first);
}

void solve()
{
	ll n, m, q;
	cin>>n>>m>>q;
	cinal(a, n);
	cinal(b, m);
	ll sum = 0, sum1 = 0;
	rep(i, n) sum += a[i] * (i%2 ? -1 :1);
	rep(i, n) sum1 += b[i] * (i%2 ? -1: 1);
	vl v;
	// error(sum, sum1);
	v.pb(sum - sum1);
	rep2(i, n, m){
		ll tmp = (-1) * (b[i] + b[i - n]);
		// error(tmp);
		sum1 += tmp;
		sum1 *= -1;
		v.pb(sum - sum1);
	}
	sort(range(v));
	ll t1 = LB(v, 0);
	sum = 0;
	n = v.size();
	cout<<min({((t1 >= 0 and t1 <n) ? abs(v[t1]): 1e15), ((t1+1 >= 0 and t1+1 <n) ? abs(v[t1+1]): 1e15), ((t1-1 >= 0 and t1-1 <n) ? abs(v[t1-1]): 1e15)})<<endl;
	while(q--){
		ll x, y, l;
		cin>>x>>y>>l;
		if(x%2){
			sum += (y%2 ? -1:0) * l;
		}
		else
			sum += (y%2 ? 1:0) * l;
		// error(sum);
		ll t11 = LB(v, sum);
		ll t2 = LB(v, sum - 1);
		// error(t1, t2, v[t11]);
		// cout<<abs(v[t11])<<endl;
		cout<<min({((t11 >= 0 and t11 <n) ? abs(v[t11]-sum): 1e15), ((t11+1 >= 0 and t11+1 <n) ? abs(v[t11+1]-sum): 1e15), ((t11-1 >= 0 and t11-1 <n) ? abs(v[t11-1]- sum): 1e15), ((t2 >= 0 and t2 <n) ? abs(v[t2]-sum): 1e15), ((t2+1 >= 0 and t2+1 <n) ? abs(v[t2+1]-sum): 1e15), ((t2-1 >= 0 and t2-1 <n) ? abs(v[t2-1]-sum): 1e15)})<<endl;
	}
}

// #define _DEBUG 1
int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0), cout.tie(0);
	// cout << fixed << setprecision(15);

	int tc = 1;
	// cin>>tc;
	while(tc--)
	{
#ifdef _DEBUG
	int tt = clock();
#endif
		solve();

#ifdef _DEBUG
		cerr << "TIME = " << clock() - tt << endl;
		tt = clock();
#endif
	}
	return 0;
}


	#pragma GCC optimize("Ofast")

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

#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define pop_b pop_back
#define pf push_front
#define pop_f pop_front
#define mt make_tuple
#define eb emplace_back
#define sf(x) sizeof(x)
#define len(x) x.length()
#define sz(x) x.size()
#define fastio() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)

#define LB(x,v) (lower_bound(x.begin(),x.end(),v)-x.begin())
#define UB(x,v) (upper_bound(x.begin(),x.end(),v)-x.begin())
typedef long long ll;
typedef pair<ll,ll> ii;
typedef long double ld;
typedef vector<int> vi;
typedef vector<set<ll>> vset;
typedef vector<ll> vl;
typedef vector<ld> vd;
typedef deque<ll> dql;
typedef deque<int> dqi;
typedef unsigned long long ull;
typedef tuple<int,int,int> State;

#define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }
void err(istream_iterator<string> it) {}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
	cerr << *it << " = " << a << endl;
	err(++it, args...);
}
#define vmax(type)   std::numeric_limits<type>::max()
#define vmin(type)   std::numeric_limits<type>::min()
#define each(a,x) for( auto &a:(x))
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define repr(i, n) for (ll i = (n) - 1; i >= 0; i--)
#define rep2(i, l, r) for (ll i = (l); i < (r); i++)
#define rep2r(i, l, r) for (ll i = (r) - 1; i >= (l); i--)
#define range(a) a.begin(), a.end()
#define deb(x) cout<<#x<<" "<<x<<endl;
#define cini(i) int i; cin>>i;
#define cinll(l) ll l; cin>>l;
#define cinll2(l, z) ll l, z; cin>>l>>z;
#define cinll3(l, z, x) ll l, z, x; cin>>l>>z>>x;
#define cinai(a, n) vi a(n); rep(i, n) { cin>>a[i]; }
#define cinal(a, n) vl a(n); rep(i, n) { cin>>a[i]; }
#define coutai(a, n) rep(i, n) { cout<<a[i]<<" "; } ent;
#define coutal(a, n) rep(i, n) { cout<<a[i]<<" "; } ent;
#define ent cout<<endl;
#define resize_vec(a) a.resize(unique(a.begin(), a.end()) - a.begin());
#define ms(dp, x) memset(dp, x, sf(dp))

// const long long MAX_SIZE = 1000000;
// vector<long long >isprime(MAX_SIZE , true);
// vector<long long >prime;
// vector<long long >SPF(MAX_SIZE);

// // function generate all prime number less then N in O(n)
// void manipulated_seive(ll N)
// {
//     isprime[0] = isprime[1] = false ;
//     for (ll i=2; i<N ; i++)
//     {
//         if (isprime[i])
//         {
//             prime.push_back(i);
//             SPF[i] = i;
//         }
//         for (ll j=0;j < prime.size() && i*prime[j] < N && prime[j] <= SPF[i];j++)
//         {
//             isprime[i*prime[j]]=false;
//             SPF[i*prime[j]] = prime[j] ;
//         }
//     }
// }
ll mod = 1e9 + 7;

ll powm(ll a, ll b, ll mod) {
	ll res=1;
	while(b) {
		if(b&1)
			res=(res*a)%mod;
		a=(a*a)%mod;
		b>>=1;
	}
	return res;
}
bool sortinrev(const pair<int,int> &a, const pair<int,int> &b)
{
       return (a.first > b.first);
}

void solve()
{
	ll n, m, q;
	cin>>n>>m>>q;
	cinal(a, n);
	cinal(b, m);
	ll sum = 0, sum1 = 0;
	rep(i, n) sum += a[i] * (i%2 ? -1 :1);
	rep(i, n) sum1 += b[i] * (i%2 ? -1: 1);
	vl v;
	// error(sum, sum1);
	v.pb(sum - sum1);
	rep2(i, n, m){
		ll tmp = (-1) * (b[i] + b[i - n]);
		// error(tmp);
		sum1 += tmp;
		sum1 *= -1;
		v.pb(sum - sum1);
	}
	sort(range(v));
	ll t1 = LB(v, 0);
	sum = 0;
	n = v.size();
	cout<<((ll)min({((t1 >= 0 and t1 <n) ? abs(v[t1]): 1e15), ((t1+1 >= 0 and t1+1 <n) ? abs(v[t1+1]): 1e15), ((t1-1 >= 0 and t1-1 <n) ? abs(v[t1-1]): 1e15)}))<<endl;
	while(q--){
		ll x, y, l;
		cin>>x>>y>>l;
		if(x%2){
			sum += (y%2 ? -1:0) * l;
		}
		else
			sum += (y%2==0 ? 1:0) * l;
		// error(sum);
		ll t11 = LB(v, sum);
		cout<<((ll)min({((t11 >= 0 and t11 <n) ? abs(v[t11]-sum): 1e15), ((t11+1 >= 0 and t11+1 <n) ? abs(v[t11+1]-sum): 1e15), ((t11-1 >= 0 and t11-1 <n) ? abs(v[t11-1]- sum): 1e15)}))<<endl;
	}
}

// #define _DEBUG 1
int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0), cout.tie(0);
	// cout << fixed << setprecision(15);

	int tc = 1;
	// cin>>tc;
	while(tc--)
	{
#ifdef _DEBUG
	int tt = clock();
#endif
		solve();

#ifdef _DEBUG
		cerr << "TIME = " << clock() - tt << endl;
		tt = clock();
#endif
	}
	return 0;
}


	#pragma GCC optimize("Ofast")

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

#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define pop_b pop_back
#define pf push_front
#define pop_f pop_front
#define mt make_tuple
#define eb emplace_back
#define sf(x) sizeof(x)
#define len(x) x.length()
#define sz(x) x.size()
#define fastio() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)

#define LB(x,v) (lower_bound(x.begin(),x.end(),v)-x.begin())
#define UB(x,v) (upper_bound(x.begin(),x.end(),v)-x.begin())
typedef long long ll;
typedef pair<ll,ll> ii;
typedef long double ld;
typedef vector<int> vi;
typedef vector<set<ll>> vset;
typedef vector<ll> vl;
typedef vector<ld> vd;
typedef deque<ll> dql;
typedef deque<int> dqi;
typedef unsigned long long ull;
typedef tuple<int,int,int> State;

#define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }
void err(istream_iterator<string> it) {}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
	cerr << *it << " = " << a << endl;
	err(++it, args...);
}
#define vmax(type)   std::numeric_limits<type>::max()
#define vmin(type)   std::numeric_limits<type>::min()
#define each(a,x) for( auto &a:(x))
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define repr(i, n) for (ll i = (n) - 1; i >= 0; i--)
#define rep2(i, l, r) for (ll i = (l); i < (r); i++)
#define rep2r(i, l, r) for (ll i = (r) - 1; i >= (l); i--)
#define range(a) a.begin(), a.end()
#define deb(x) cout<<#x<<" "<<x<<endl;
#define cini(i) int i; cin>>i;
#define cinll(l) ll l; cin>>l;
#define cinll2(l, z) ll l, z; cin>>l>>z;
#define cinll3(l, z, x) ll l, z, x; cin>>l>>z>>x;
#define cinai(a, n) vi a(n); rep(i, n) { cin>>a[i]; }
#define cinal(a, n) vl a(n); rep(i, n) { cin>>a[i]; }
#define coutai(a, n) rep(i, n) { cout<<a[i]<<" "; } ent;
#define coutal(a, n) rep(i, n) { cout<<a[i]<<" "; } ent;
#define ent cout<<endl;
#define resize_vec(a) a.resize(unique(a.begin(), a.end()) - a.begin());
#define ms(dp, x) memset(dp, x, sf(dp))

// const long long MAX_SIZE = 1000000;
// vector<long long >isprime(MAX_SIZE , true);
// vector<long long >prime;
// vector<long long >SPF(MAX_SIZE);

// // function generate all prime number less then N in O(n)
// void manipulated_seive(ll N)
// {
//     isprime[0] = isprime[1] = false ;
//     for (ll i=2; i<N ; i++)
//     {
//         if (isprime[i])
//         {
//             prime.push_back(i);
//             SPF[i] = i;
//         }
//         for (ll j=0;j < prime.size() && i*prime[j] < N && prime[j] <= SPF[i];j++)
//         {
//             isprime[i*prime[j]]=false;
//             SPF[i*prime[j]] = prime[j] ;
//         }
//     }
// }
ll mod = 1e9 + 7;

ll powm(ll a, ll b, ll mod) {
	ll res=1;
	while(b) {
		if(b&1)
			res=(res*a)%mod;
		a=(a*a)%mod;
		b>>=1;
	}
	return res;
}
bool sortinrev(const pair<int,int> &a, const pair<int,int> &b)
{
       return (a.first > b.first);
}

void solve()
{
	ll n, m, q;
	cin>>n>>m>>q;
	cinal(a, n);
	cinal(b, m);
	ll sum = 0, sum1 = 0;
	rep(i, n) sum += a[i] * (i%2 ? -1 :1);
	rep(i, n) sum1 += b[i] * (i%2 ? -1: 1);
	vl v;
	// error(sum, sum1);
	v.pb(sum - sum1);
	rep2(i, n, m){
		ll tmp = (-1) * (b[i] + b[i - n]);
		// error(tmp);
		sum1 += tmp;
		sum1 *= -1;
		v.pb(sum - sum1);
	}
	sort(range(v));
	ll t1 = LB(v, 0);
	sum = 0;
	n = v.size();
	ll _MIN = 1e10;
	rep(i, n){
		_MIN = min(_MIN, (ll)abs(v[i]));
	}
	cout<<_MIN<<endl;
	while(q--){
		ll x, y, l;
		cin>>x>>y>>l;
		if(x%2){
			sum += (y%2 ? -1:0) * l;
		}
		else
			sum += (y%2==0 ? 1:0) * l;
		// error(sum);
		ll t11 = LB(v, sum);
		cout<<((ll)min({((t11 >= 0 and t11 <n) ? abs(v[t11]-sum): 1e15), ((t11+1 >= 0 and t11+1 <n) ? abs(v[t11+1]-sum): 1e15), ((t11-1 >= 0 and t11-1 <n) ? abs(v[t11-1]- sum): 1e15)}))<<endl;
	}
}

// #define _DEBUG 1
int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0), cout.tie(0);
	// cout << fixed << setprecision(15);

	int tc = 1;
	// cin>>tc;
	while(tc--)
	{
#ifdef _DEBUG
	int tt = clock();
#endif
		solve();

#ifdef _DEBUG
		cerr << "TIME = " << clock() - tt << endl;
		tt = clock();
#endif
	}
	return 0;
}


	#pragma GCC optimize("Ofast")

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

#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define pop_b pop_back
#define pf push_front
#define pop_f pop_front
#define mt make_tuple
#define eb emplace_back
#define sf(x) sizeof(x)
#define len(x) x.length()
#define sz(x) x.size()
#define fastio() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)

#define LB(x,v) (lower_bound(x.begin(),x.end(),v)-x.begin())
#define UB(x,v) (upper_bound(x.begin(),x.end(),v)-x.begin())
typedef long long ll;
typedef pair<ll,ll> ii;
typedef long double ld;
typedef vector<int> vi;
typedef vector<set<ll>> vset;
typedef vector<ll> vl;
typedef vector<ld> vd;
typedef deque<ll> dql;
typedef deque<int> dqi;
typedef unsigned long long ull;
typedef tuple<int,int,int> State;

#define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }
void err(istream_iterator<string> it) {}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
	cerr << *it << " = " << a << endl;
	err(++it, args...);
}
#define vmax(type)   std::numeric_limits<type>::max()
#define vmin(type)   std::numeric_limits<type>::min()
#define each(a,x) for( auto &a:(x))
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define repr(i, n) for (ll i = (n) - 1; i >= 0; i--)
#define rep2(i, l, r) for (ll i = (l); i < (r); i++)
#define rep2r(i, l, r) for (ll i = (r) - 1; i >= (l); i--)
#define range(a) a.begin(), a.end()
#define deb(x) cout<<#x<<" "<<x<<endl;
#define cini(i) int i; cin>>i;
#define cinll(l) ll l; cin>>l;
#define cinll2(l, z) ll l, z; cin>>l>>z;
#define cinll3(l, z, x) ll l, z, x; cin>>l>>z>>x;
#define cinai(a, n) vi a(n); rep(i, n) { cin>>a[i]; }
#define cinal(a, n) vl a(n); rep(i, n) { cin>>a[i]; }
#define coutai(a, n) rep(i, n) { cout<<a[i]<<" "; } ent;
#define coutal(a, n) rep(i, n) { cout<<a[i]<<" "; } ent;
#define ent cout<<endl;
#define resize_vec(a) a.resize(unique(a.begin(), a.end()) - a.begin());
#define ms(dp, x) memset(dp, x, sf(dp))

// const long long MAX_SIZE = 1000000;
// vector<long long >isprime(MAX_SIZE , true);
// vector<long long >prime;
// vector<long long >SPF(MAX_SIZE);

// // function generate all prime number less then N in O(n)
// void manipulated_seive(ll N)
// {
//     isprime[0] = isprime[1] = false ;
//     for (ll i=2; i<N ; i++)
//     {
//         if (isprime[i])
//         {
//             prime.push_back(i);
//             SPF[i] = i;
//         }
//         for (ll j=0;j < prime.size() && i*prime[j] < N && prime[j] <= SPF[i];j++)
//         {
//             isprime[i*prime[j]]=false;
//             SPF[i*prime[j]] = prime[j] ;
//         }
//     }
// }
ll mod = 1e9 + 7;

ll powm(ll a, ll b, ll mod) {
	ll res=1;
	while(b) {
		if(b&1)
			res=(res*a)%mod;
		a=(a*a)%mod;
		b>>=1;
	}
	return res;
}
bool sortinrev(const pair<int,int> &a, const pair<int,int> &b)
{
       return (a.first > b.first);
}

void solve()
{
	ll n, m, q;
	cin>>n>>m>>q;
	cinal(a, n);
	cinal(b, m);
	ll sum = 0, sum1 = 0;
	rep(i, n) sum += a[i] * (i%2 ? -1 :1);
	rep(i, n) sum1 += b[i] * (i%2 ? -1: 1);
	vl v;
	// error(sum, sum1);
	v.pb(sum - sum1);
	rep2(i, n, m){
		ll tmp = (-1) * (b[i] + b[i - n]);
		// error(tmp);
		sum1 += tmp;
		sum1 *= -1;
		v.pb(sum - sum1);
	}
	sort(range(v));
	ll t1 = LB(v, 0);
	sum = 0;
	n = v.size();
	cout<<((ll)min({((t1 >= 0 and t1 <n) ? abs(v[t1]): 1e15), ((t1+1 >= 0 and t1+1 <n) ? abs(v[t1+1]): 1e15), ((t1-1 >= 0 and t1-1 <n) ? abs(v[t1-1]): 1e15)}))<<endl;
	while(q--){
		ll x, y, l;
		cin>>x>>y>>l;
		if(x%2){
			sum += (y%2 ? -1:0) * l;
		}
		else
			sum += (y%2 ? 1:0) * l;
		// error(sum);
		ll t11 = LB(v, sum);
		ll t2 = LB(v, sum - 1);
		// error(t1, t2, v[t11]);
		// cout<<abs(v[t11])<<endl;
		cout<<((ll)min({((t11 >= 0 and t11 <n) ? abs(v[t11]-sum): 1e15), ((t11+1 >= 0 and t11+1 <n) ? abs(v[t11+1]-sum): 1e15), ((t11-1 >= 0 and t11-1 <n) ? abs(v[t11-1]- sum): 1e15), ((t2 >= 0 and t2 <n) ? abs(v[t2]-sum): 1e15), ((t2+1 >= 0 and t2+1 <n) ? abs(v[t2+1]-sum): 1e15), ((t2-1 >= 0 and t2-1 <n) ? abs(v[t2-1]-sum): 1e15)}))<<endl;
	}
}

// #define _DEBUG 1
int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0), cout.tie(0);
	// cout << fixed << setprecision(15);

	int tc = 1;
	// cin>>tc;
	while(tc--)
	{
#ifdef _DEBUG
	int tt = clock();
#endif
		solve();

#ifdef _DEBUG
		cerr << "TIME = " << clock() - tt << endl;
		tt = clock();
#endif
	}
	return 0;
}


	#pragma GCC optimize("Ofast")

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

#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define pop_b pop_back
#define pf push_front
#define pop_f pop_front
#define mt make_tuple
#define eb emplace_back
#define sf(x) sizeof(x)
#define len(x) x.length()
#define sz(x) x.size()
#define fastio() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)

#define LB(x,v) (lower_bound(x.begin(),x.end(),v)-x.begin())
#define UB(x,v) (upper_bound(x.begin(),x.end(),v)-x.begin())
typedef long long ll;
typedef pair<ll,ll> ii;
typedef long double ld;
typedef vector<int> vi;
typedef vector<set<ll>> vset;
typedef vector<ll> vl;
typedef vector<ld> vd;
typedef deque<ll> dql;
typedef deque<int> dqi;
typedef unsigned long long ull;
typedef tuple<int,int,int> State;

#define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }
void err(istream_iterator<string> it) {}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
	cerr << *it << " = " << a << endl;
	err(++it, args...);
}
#define vmax(type)   std::numeric_limits<type>::max()
#define vmin(type)   std::numeric_limits<type>::min()
#define each(a,x) for( auto &a:(x))
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define repr(i, n) for (ll i = (n) - 1; i >= 0; i--)
#define rep2(i, l, r) for (ll i = (l); i < (r); i++)
#define rep2r(i, l, r) for (ll i = (r) - 1; i >= (l); i--)
#define range(a) a.begin(), a.end()
#define deb(x) cout<<#x<<" "<<x<<endl;
#define cini(i) int i; cin>>i;
#define cinll(l) ll l; cin>>l;
#define cinll2(l, z) ll l, z; cin>>l>>z;
#define cinll3(l, z, x) ll l, z, x; cin>>l>>z>>x;
#define cinai(a, n) vi a(n); rep(i, n) { cin>>a[i]; }
#define cinal(a, n) vl a(n); rep(i, n) { cin>>a[i]; }
#define coutai(a, n) rep(i, n) { cout<<a[i]<<" "; } ent;
#define coutal(a, n) rep(i, n) { cout<<a[i]<<" "; } ent;
#define ent cout<<endl;
#define resize_vec(a) a.resize(unique(a.begin(), a.end()) - a.begin());
#define ms(dp, x) memset(dp, x, sf(dp))

// const long long MAX_SIZE = 1000000;
// vector<long long >isprime(MAX_SIZE , true);
// vector<long long >prime;
// vector<long long >SPF(MAX_SIZE);

// // function generate all prime number less then N in O(n)
// void manipulated_seive(ll N)
// {
//     isprime[0] = isprime[1] = false ;
//     for (ll i=2; i<N ; i++)
//     {
//         if (isprime[i])
//         {
//             prime.push_back(i);
//             SPF[i] = i;
//         }
//         for (ll j=0;j < prime.size() && i*prime[j] < N && prime[j] <= SPF[i];j++)
//         {
//             isprime[i*prime[j]]=false;
//             SPF[i*prime[j]] = prime[j] ;
//         }
//     }
// }
ll mod = 1e9 + 7;

ll powm(ll a, ll b, ll mod) {
	ll res=1;
	while(b) {
		if(b&1)
			res=(res*a)%mod;
		a=(a*a)%mod;
		b>>=1;
	}
	return res;
}
bool sortinrev(const pair<int,int> &a, const pair<int,int> &b)
{
       return (a.first > b.first);
}

void solve()
{
	ll n, m, q;
	cin>>n>>m>>q;
	cinal(a, n);
	cinal(b, m);
	ll sum = 0, sum1 = 0;
	rep(i, n) sum += a[i] * (i%2 ? -1 :1);
	rep(i, n) sum1 += b[i] * (i%2 ? -1: 1);
	vl v;
	// error(sum, sum1);
	v.pb(sum - sum1);
	rep2(i, n, m){
		ll tmp = 0;
		if(i%2==0)
			tmp -= (-1)*(b[i]);
		else
			tmp += (-1)*(b[i]);
		if(n%2)
			tmp -= b[i-n];
		else
			tmp += b[i-n];
		// error(tmp);
		sum1 += tmp;
		sum1 *= -1;
		v.pb(sum - sum1);
	}
	sort(range(v));
	ll t1 = LB(v, 0);
	sum = 0;
	n = v.size();
	ll _MIN = 1e10;
	rep(i, n){
		_MIN = min(_MIN, (ll)abs(v[i]));
	}
	cout<<_MIN<<endl;
	while(q--){
		ll x, y, l;
		cin>>x>>y>>l;
		if(x%2){
			sum += (y%2 ? -1:0) * l;
		}
		else
			sum += (y%2==0 ? 1:0) * l;
		// error(sum);
		ll t11 = LB(v, sum);
		cout<<((ll)min({((t11 >= 0 and t11 <n) ? abs(v[t11]-sum): 1e15), ((t11+1 >= 0 and t11+1 <n) ? abs(v[t11+1]-sum): 1e15), ((t11-1 >= 0 and t11-1 <n) ? abs(v[t11-1]- sum): 1e15)}))<<endl;
	}
}

// #define _DEBUG 1
int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0), cout.tie(0);
	// cout << fixed << setprecision(15);

	int tc = 1;
	// cin>>tc;
	while(tc--)
	{
#ifdef _DEBUG
	int tt = clock();
#endif
		solve();

#ifdef _DEBUG
		cerr << "TIME = " << clock() - tt << endl;
		tt = clock();
#endif
	}
	return 0;
}


	#pragma GCC optimize("Ofast")

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

#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define pop_b pop_back
#define pf push_front
#define pop_f pop_front
#define mt make_tuple
#define eb emplace_back
#define sf(x) sizeof(x)
#define len(x) x.length()
#define sz(x) x.size()
#define fastio() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)

#define LB(x,v) (lower_bound(x.begin(),x.end(),v)-x.begin())
#define UB(x,v) (upper_bound(x.begin(),x.end(),v)-x.begin())
typedef long long ll;
typedef pair<ll,ll> ii;
typedef long double ld;
typedef vector<int> vi;
typedef vector<set<ll>> vset;
typedef vector<ll> vl;
typedef vector<ld> vd;
typedef deque<ll> dql;
typedef deque<int> dqi;
typedef unsigned long long ull;
typedef tuple<int,int,int> State;

#define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }
void err(istream_iterator<string> it) {}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
	cerr << *it << " = " << a << endl;
	err(++it, args...);
}
#define vmax(type)   std::numeric_limits<type>::max()
#define vmin(type)   std::numeric_limits<type>::min()
#define each(a,x) for( auto &a:(x))
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define repr(i, n) for (ll i = (n) - 1; i >= 0; i--)
#define rep2(i, l, r) for (ll i = (l); i < (r); i++)
#define rep2r(i, l, r) for (ll i = (r) - 1; i >= (l); i--)
#define range(a) a.begin(), a.end()
#define deb(x) cout<<#x<<" "<<x<<endl;
#define cini(i) int i; cin>>i;
#define cinll(l) ll l; cin>>l;
#define cinll2(l, z) ll l, z; cin>>l>>z;
#define cinll3(l, z, x) ll l, z, x; cin>>l>>z>>x;
#define cinai(a, n) vi a(n); rep(i, n) { cin>>a[i]; }
#define cinal(a, n) vl a(n); rep(i, n) { cin>>a[i]; }
#define coutai(a, n) rep(i, n) { cout<<a[i]<<" "; } ent;
#define coutal(a, n) rep(i, n) { cout<<a[i]<<" "; } ent;
#define ent cout<<endl;
#define resize_vec(a) a.resize(unique(a.begin(), a.end()) - a.begin());
#define ms(dp, x) memset(dp, x, sf(dp))

// const long long MAX_SIZE = 1000000;
// vector<long long >isprime(MAX_SIZE , true);
// vector<long long >prime;
// vector<long long >SPF(MAX_SIZE);

// // function generate all prime number less then N in O(n)
// void manipulated_seive(ll N)
// {
//     isprime[0] = isprime[1] = false ;
//     for (ll i=2; i<N ; i++)
//     {
//         if (isprime[i])
//         {
//             prime.push_back(i);
//             SPF[i] = i;
//         }
//         for (ll j=0;j < prime.size() && i*prime[j] < N && prime[j] <= SPF[i];j++)
//         {
//             isprime[i*prime[j]]=false;
//             SPF[i*prime[j]] = prime[j] ;
//         }
//     }
// }
ll mod = 1e9 + 7;

ll powm(ll a, ll b, ll mod) {
	ll res=1;
	while(b) {
		if(b&1)
			res=(res*a)%mod;
		a=(a*a)%mod;
		b>>=1;
	}
	return res;
}
bool sortinrev(const pair<int,int> &a, const pair<int,int> &b)
{
       return (a.first > b.first);
}

const ll M=1e5+5;
ll a[M],b[M];
ll sum[M];
std::vector<ll> ans;
void solve()
{
	int n,m,q,i;
	cin>>n>>m>>q;
	for(i=1;i<=n;i++)
		cin>>a[i];
	for(i=1;i<=m;i++)
		cin>>b[i];
	int t=1;
	for(i=1;i<=m;i++)
	{
		sum[i]=sum[i-1]+t*b[i];
		t*=-1;
		// cout<<i<<" "<<sum[i]<<endl;
	}
	// cout<<endl;
	// ll Min=1e16,Max=-1e16;
	int j;
	ll x,y=0;
	t=1;
	for(i=1;i<=n;i++)
	{
		y=y+t*a[i];
		t*=-1;
	}
	t=1;
	for(j=0;j<=m-n;j++)
	{
		ans.pb(t*(sum[n+j]-sum[j]));
		t*=-1;
	}
	int l,r;
	sort(ans.begin(),ans.end());
	// for(i=0;i<ans.size();i++)
	// 	cout<<ans[i]<<endl;
	int len=0;
	ll val=1e16;
	len=ans.size()-1;
	if(y>ans[len])
		val=min(val,abs(y-ans[len]));
	else
	{
		t=lower_bound(ans.begin(), ans.end(),y)-ans.begin();
		val=min(val,abs(y-ans[t]));
		if(t>0)
			val=min(val,abs(y-ans[t-1]));
	}
	// cout<<y<<endl;
	cout<<val<<"\n";
	while(q--)
	{
		val=1e16;
		cin>>l>>r>>x;
		len=r-l+1;
		if(len%2)
		{
			if(l%2)
				y+=x;
			else
				y-=x;
		}
		// cout<<y<<endl;
		len=ans.size()-1;
		if(y>ans[len])
			val=min(val,y-ans[len]);
		else
		{
			t=lower_bound(ans.begin(), ans.end(),y)-ans.begin();
			// cout<<ans[t]<<endl;
			val=min(val,abs(y-ans[t]));
			if(t>0)
				val=min(val,abs(y-ans[t-1]));
		}
		cout<<val<<"\n";
	}
}

// #define _DEBUG 1
int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0), cout.tie(0);
	// cout << fixed << setprecision(15);

	int tc = 1;
	// cin>>tc;
	while(tc--)
	{
#ifdef _DEBUG
	int tt = clock();
#endif
		solve();

#ifdef _DEBUG
		cerr << "TIME = " << clock() - tt << endl;
		tt = clock();
#endif
	}
	return 0;
}


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

#define rep(i, a, b) for(int i = a; i < (b); ++i)
#define trav(a, x) for(auto& a : x)
#define allin(a , x) for(auto a : x)
#define all(x) begin(x), end(x)
#define sz(x) (int)(x).size()
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;

template<class T1, class T2>
istream &operator>>(istream &in, pair<T1, T2> &P){
	in >> P.first >> P.second;
	return in;
}
template<class T1, class T2>
ostream &operator<<(ostream &out, const pair<T1, T2> &P){
	out << "(" << P.first << ", " << P.second << ")";
	return out;
}
template<class T>
istream &operator>>(istream &in, vector<T> &arr){
	for(auto &x: arr) in >> x;
	return in;
}
template<class T>
ostream &operator<<(ostream &out, const vector<T> &arr){
	for(auto &x: arr) out << x << ' '; cout << "\n";
	return out;
}
template<class T>
istream &operator>>(istream &in, deque<T> &arr){
	for(auto &x: arr) in >> x;
	return in;
}
template<class T>
ostream &operator<<(ostream &out, const deque<T> &arr){
	for(auto &x: arr) out << x << ' '; cout << "\n";
	return out;
}
ll n , m , q;
vi a  , b;
ll soma = 0;
ll B[100005];
ll best = (ll) 1e18;
int32_t main(){
	ios::sync_with_stdio(false);
	cin.tie(0) , cout.tie(0);
	cin>>n>>m>>q;
	a.resize(n) , b.resize(m);
	cin>>a>>b;
	int lst = 1;
	for(auto w : a){
		soma += w*lst;
		lst *= -1;
	}
	for(int i = 1 ; i <= m ; i ++){
		B[i] = b[i-1];
	}
	set<ll> vls;
	for(int i = m ; i >= 1 ; i --){
		B[i] += B[i+2];
	}
	int sp = - 1 , si = -1;
	if(n%2){
		sp = n+1;
		si = n +2;
	}
	else{
		sp = n+2;
		si = n + 1;
	}
	for(int j = 0 ; j <= m - n; j ++){
		vls.insert(-(+(B[j+2] - B[sp]) - (B[j+1] - B[si])));
		sp++ , si++;
	}
	auto r = vls.lower_bound(soma);
	if(r != vls.end()){
		best = min(best , abs(soma - (*r)));
	}
	if(r != vls.begin()){
		best = min(best, abs(soma - (*prev(r))));
	}
	cout<<best<<endl;
	while(q--){
		int l , r, x;
		cin>>l>>r>>x;
		if((r-l+1)%2){
			if(l%2) soma += x;
			else soma-= x;
		}
		auto rq = vls.lower_bound(soma);
		ll nbest = (ll) 1e18;
		if(rq!= vls.end()){
			nbest = min(nbest, abs(soma - (*rq)));
		}
		if(rq!=vls.begin()){
			nbest = min(nbest, abs(soma - *prev(rq)));
		}
		cout<<nbest<<endl;
	}
}


#include <bits/stdc++.h>
#ifdef NJUDGE
#include "igba.h"
#endif

using namespace std;
typedef long long ll;
#define int ll
const int MAXN = 100100, INF = 0x3f3f3f3f3f3f3f3f;

int n, m, q, a, neg[] = {-1, 1}, b[MAXN], l, r, x, tmp;
ll sa = 0, sb[MAXN];

signed main()
{
	scanf("%lld %lld %lld", &n, &m, &q);
	for(int i = 1; i <= n; ++i)
		scanf("%lld", &a), sa += neg[i % 2] * a;
	for(int i = 1; i <= m; ++i)
		scanf("%lld", &b[i]), sb[1] += (i <= n ? neg[i % 2] * b[i] : 0);
	for(int i = 2; i + n - 1 <= m; ++i)
		sb[i] = -(sb[i - 1] - b[i - 1]) + neg[n % 2] * b[i + n - 1];
	sort(sb + 1, sb + m - n + 2);
	sb[0] = -INF, sb[m - n + 2] = INF;
	tmp = (lower_bound(sb + 1, sb + m - n + 1, -sa) - sb);
	printf("%lld\n", min(abs(sa - sb[tmp]), min(abs(sa - sb[tmp + 1]), abs(sa - sb[tmp - 1]))));
	while(q--)
	{
		scanf("%lld %lld %lld", &l, &r, &x);
		if((r - l + 1) % 2 == 1)
			sa += neg[l % 2] * x;
		tmp = (lower_bound(sb + 1, sb + m - n + 1, -sa) - sb);
		printf("%lld\n", min(abs(sa - sb[tmp]), min(abs(sa - sb[tmp + 1]), abs(sa - sb[tmp - 1]))));
	}
}


#include <bits/stdc++.h>
#ifdef NJUDGE
#include "igba.h"
#endif

using namespace std;
typedef long long ll;
#define int ll
const int MAXN = 100100, INF = 0x3f3f3f3f3f3f3f3f;

int n, m, q, a, neg[] = {-1, 1}, b[MAXN], l, r, x, tmp;
ll sa = 0, sb[MAXN];

signed main()
{
	scanf("%lld %lld %lld", &n, &m, &q);
	for(int i = 1; i <= n; ++i)
		scanf("%lld", &a), sa += neg[i % 2] * a;
	for(int i = 1; i <= m; ++i)
		scanf("%lld", &b[i]), sb[1] += (i <= n ? neg[i % 2] * b[i] : 0);
	for(int i = 2; i + n - 1 <= m; ++i)
		sb[i] = -(sb[i - 1] - b[i - 1]) + neg[n % 2] * b[i + n - 1];
	sort(sb + 1, sb + m - n + 2);
	sb[0] = -INF, sb[m - n + 2] = INF;
	tmp = (lower_bound(sb + 1, sb + m - n + 1, sa) - sb);
	printf("%lld\n", min(abs(sa - sb[tmp]), min(abs(sa - sb[tmp + 1]), abs(sa - sb[tmp - 1]))));
	while(q--)
	{
		scanf("%lld %lld %lld", &l, &r, &x);
		if((r - l + 1) % 2 == 1)
			sa += neg[l % 2] * x;
		tmp = (lower_bound(sb + 1, sb + m - n + 1, sa) - sb);
		printf("%lld\n", min(abs(sa - sb[tmp]), min(abs(sa - sb[tmp + 1]), abs(sa - sb[tmp - 1]))));
	}
}


#include <bits/stdc++.h>
#ifdef NJUDGE
#include "igba.h"
#endif

using namespace std;
typedef long long ll;
const int MAXN = 100100, INF = 0x3f3f3f3f;

int n, m, q, a, neg[] = {-1, 1}, b[MAXN], l, r, x, tmp;
ll sa = 0, sb[MAXN];

int main()
{
	scanf("%d %d %d", &n, &m, &q);
	for(int i = 1; i <= n; ++i)
		scanf("%d", &a), sa += neg[i % 2] * a;
	for(int i = 1; i <= m; ++i)
		scanf("%d", &b[i]), sb[1] += (i <= n ? neg[i % 2] * b[i] : 0);
	for(int i = 2; i + n - 1 <= m; ++i)
		sb[i] = -(sb[i - 1] - b[i - 1]) + neg[n % 2] * b[i + n - 1];
	sort(sb + 1, sb + m - n + 1);
	sb[0] = -INF, sb[m - n + 2] = INF;
	tmp = (lower_bound(sb + 1, sb + m - n + 1, -sa) - sb);
	printf("%d\n", min(abs(sa - sb[tmp]), min(abs(sa - sb[tmp + 1]), abs(sa - sb[tmp - 1]))));
	while(q--)
	{
		scanf("%d %d %d", &l, &r, &x);
		if((r - l + 1) % 2 == 1)
			sa += neg[l % 2] * x;
		tmp = (lower_bound(sb + 1, sb + m - n + 1, -sa) - sb);
		printf("%d\n", min(abs(sa - sb[tmp]), min(abs(sa - sb[tmp + 1]), abs(sa - sb[tmp - 1]))));
	}
}


#include <bits/stdc++.h>
#ifdef NJUDGE
#include "igba.h"
#endif

using namespace std;
typedef long long ll;
#define int ll
const int MAXN = 100100, INF = 0x3f3f3f3f3f3f3f3f;

int n, m, q, a, neg[] = {-1, 1}, b[MAXN], l, r, x, tmp;
ll sa = 0, sb[MAXN];

signed main()
{
	scanf("%lld %lld %lld", &n, &m, &q);
	for(int i = 1; i <= n; ++i)
		scanf("%lld", &a), sa += neg[i % 2] * a;
	for(int i = 1; i <= m; ++i)
		scanf("%lld", &b[i]), sb[1] += (i <= n ? neg[i % 2] * b[i] : 0);
	for(int i = 2; i + n - 1 <= m; ++i)
		sb[i] = -(sb[i - 1] - b[i - 1]) + neg[n % 2] * b[i + n - 1];
	sort(sb + 1, sb + m - n + 1);
	sb[0] = -INF, sb[m - n + 2] = INF;
	tmp = (lower_bound(sb + 1, sb + m - n + 1, -sa) - sb);
	printf("%lld\n", min(abs(sa - sb[tmp]), min(abs(sa - sb[tmp + 1]), abs(sa - sb[tmp - 1]))));
	while(q--)
	{
		scanf("%lld %lld %lld", &l, &r, &x);
		if((r - l + 1) % 2 == 1)
			sa += neg[l % 2] * x;
		tmp = (lower_bound(sb + 1, sb + m - n + 1, -sa) - sb);
		printf("%lld\n", min(abs(sa - sb[tmp]), min(abs(sa - sb[tmp + 1]), abs(sa - sb[tmp - 1]))));
	}
}


#include <bits/stdc++.h>
#ifdef NJUDGE
#include "igba.h"
#endif

using namespace std;
typedef long long ll;
#define int ll
const int MAXN = 100100, INF = 0x3f3f3f3f3f3f3f3f;

int n, m, q, a, neg[] = {-1, 1}, b[MAXN], l, r, x, tmp;
ll sa = 0, sb[MAXN];

signed main()
{
	scanf("%lld %lld %lld", &n, &m, &q);
	for(int i = 1; i <= n; ++i)
		scanf("%lld", &a), sa += neg[i % 2] * a;
	for(int i = 1; i <= m; ++i)
		scanf("%lld", &b[i]), sb[1] += (i <= n ? neg[i % 2] * b[i] : 0);
	for(int i = 2; i + n - 1 <= m; ++i)
		sb[i] = -(sb[i - 1] - b[i - 1]) + neg[n % 2] * b[i + n - 1];
	sort(sb + 1, sb + m - n + 2);
	sb[0] = -INF, sb[m - n + 2] = INF;
	tmp = (lower_bound(sb + 1, sb + m - n + 1, sa) - sb);
	printf("%lld\n", min(abs(sa + sb[tmp]), min(abs(sa + sb[tmp + 1]), abs(sa + sb[tmp - 1]))));
	while(q--)
	{
		scanf("%lld %lld %lld", &l, &r, &x);
		if((r - l + 1) % 2 == 1)
			sa += neg[l % 2] * x;
		tmp = (lower_bound(sb + 1, sb + m - n + 1, sa) - sb);
		printf("%lld\n", min(abs(sa + sb[tmp]), min(abs(sa + sb[tmp + 1]), abs(sa + sb[tmp - 1]))));
	}
}


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

#define int long long

void read(int &x) {
    x=0;int f=1;char ch=getchar();
    for(;!isdigit(ch);ch=getchar()) if(ch=='-') f=-f;
    for(;isdigit(ch);ch=getchar()) x=x*10+ch-'0';x*=f;
}

void print(int x) {
    if(x<0) putchar('-'),x=-x;
    if(!x) return ;print(x/10),putchar(x%10+48);
}
void write(int x) {if(!x) putchar('0');else print(x);putchar('\n');}

#define lf double
#define ll long long

#define pii pair<int,int >
#define vec vector<int >

#define pb push_back
#define mp make_pair
#define fr first
#define sc second

#define data asd09123jdf02i3h

#define FOR(i,l,r) for(int i=l,i##_r=r;i<=i##_r;i++)

const int maxn = 1e6+10;
const int inf = 1e9;
const lf eps = 1e-8;
const int mod = 1e9+7;

int s,t[maxn],a[maxn],b[maxn],n,m,q,f[maxn];

signed main() {
    read(n),read(m),read(q);
    for(int i=1;i<=n;i++) read(a[i]),s+=a[i]*(i&1?1:-1);
    for(int i=1;i<=m;i++) read(b[i]),f[i]=f[i-1]+b[i]*(i&1?-1:1);// ,write(f[i]);
    for(int i=0;i<=m-n;i++) t[i]=(i&1?1:-1)*(f[n+i]-f[i]);
    int l=m-n+3;t[l-2]=t[0];
    t[l]=-1e18,t[l-1]=1e18;sort(t+1,t+l+1);
    // for(int i=0;i<=l;i++) printf("%lld ",t[i]);puts("");
    int bo=1;q++;
    while(q--) {
        int l,r,x;
        if(bo) l=1,r=2,bo=0;
        else read(l),read(r),read(x);
        if((r-l+1)&1) s+=(l&1?1:-1)*x;
        int i=lower_bound(t+1,t+l+1,s)-t;
        // printf(":: %lld %lld\n",s,i);
        write(min(abs(t[i]-s),abs(t[i-1]-s)));
    }
    return 0;
}


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

#define int long long

void read(int &x) {
    x=0;int f=1;char ch=getchar();
    for(;!isdigit(ch);ch=getchar()) if(ch=='-') f=-f;
    for(;isdigit(ch);ch=getchar()) x=x*10+ch-'0';x*=f;
}

void print(int x) {
    if(x<0) putchar('-'),x=-x;
    if(!x) return ;print(x/10),putchar(x%10+48);
}
void write(int x) {if(!x) putchar('0');else print(x);putchar('\n');}

#define lf double
#define ll long long

#define pii pair<int,int >
#define vec vector<int >

#define pb push_back
#define mp make_pair
#define fr first
#define sc second

#define data asd09123jdf02i3h

#define FOR(i,l,r) for(int i=l,i##_r=r;i<=i##_r;i++)

const int maxn = 1e6+10;
const int inf = 1e9;
const lf eps = 1e-8;
const int mod = 1e9+7;

int s,t[maxn],a[maxn],b[maxn],n,m,q,f[maxn];

signed main() {
    read(n),read(m),read(q);
    for(int i=1;i<=n;i++) read(a[i]),s+=a[i]*(i&1?1:-1);
    for(int i=1;i<=m;i++) read(b[i]),f[i]=f[i-1]+b[i]*(i&1?-1:1);// ,write(f[i]);
    for(int i=0;i<=m-n;i++) t[i]=(i&1?1:-1)*(f[n+i]-f[i]);
    int len=m-n+3;t[len-2]=t[0];
    t[len]=-1e18,t[len-1]=1e18;sort(t+1,t+len+1);
    // for(int i=1;i<=len;i++) printf("%lld ",t[i]);puts("");
    int bo=1;q++;
    while(q--) {
        int l,r,x;
        if(bo) l=1,r=2,bo=0;
        else read(l),read(r),read(x);
        if((r-l+1)&1) s+=(l&1?1:-1)*x;
        int i=lower_bound(t+1,t+len+1,s)-t;
        // printf(":: %lld %lld\n",s,i);
        write(min(abs(t[i]-s),abs(t[i-1]-s)));
    }
    return 0;
}


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

#define int long long

void read(int &x) {
    x=0;int f=1;char ch=getchar();
    for(;!isdigit(ch);ch=getchar()) if(ch=='-') f=-f;
    for(;isdigit(ch);ch=getchar()) x=x*10+ch-'0';x*=f;
}

void print(int x) {
    if(x<0) putchar('-'),x=-x;
    if(!x) return ;print(x/10),putchar(x%10+48);
}
void write(int x) {if(!x) putchar('0');else print(x);putchar('\n');}

#define lf double
#define ll long long

#define pii pair<int,int >
#define vec vector<int >

#define pb push_back
#define mp make_pair
#define fr first
#define sc second

#define data asd09123jdf02i3h

#define FOR(i,l,r) for(int i=l,i##_r=r;i<=i##_r;i++)

const int maxn = 1e6+10;
const int inf = 1e9;
const lf eps = 1e-8;
const int mod = 1e9+7;

int s,t[maxn],a[maxn],b[maxn],n,m,q,f[maxn];

signed main() {
    read(n),read(m),read(q);
    for(int i=1;i<=n;i++) read(a[i]),s+=a[i]*(i&1?1:-1);
    for(int i=1;i<=m;i++) read(b[i]),f[i]=f[i-1]+b[i]*(i&1?-1:1);// ,write(f[i]);
    for(int i=0;i<=m-n;i++) t[i]=(i&1?1:-1)*(f[n+i]-f[i]);
    sort(t,t+m-n+1);t[m-n+1]=1e18;int l=m-n+1;
    // for(int i=0;i<=l;i++) printf("%lld ",t[i]);puts("");
    int bo=1;q++;
    while(q--) {
        int l,r,x;
        if(bo) l=1,r=2,bo=0;
        else read(l),read(r),read(x);
        if((r-l+1)&1) s+=(l&1?1:-1)*x;
        int i=lower_bound(t,t+l+1,s)-t;
        // printf(":: %lld %lld\n",s,i);
        int res=abs(t[i]-s);
        if(i) res=min(res,abs(t[i-1]-s));
        write(res);
    }
    return 0;
}


#include <bits/stdc++.h>

#define int long long

using namespace std;

const int MAXN = 100 * 1000 + 23;

int n, m, q, a[MAXN], b[MAXN], sim, kam;
set<int> s;

int32_t main() {
    cin >> n >> m >> q;
    for (int i = 0; i < n; i++) cin >> a[i];
    for (int i = 0; i < n; i++) sim += (i & 1? -a[i]: a[i]);
    for (int i = 0; i < m; i++) cin >> b[i];
    for (int i = 0; i < n; i++) kam += (i & 1? b[i]: -b[i]);
    for (int i = n; i < m; i++) {
        s.insert(kam);
        kam += b[i - n];
        kam = -kam;
        kam += (n & 1? -b[i]: b[i]);
    }
    s.insert(kam);
    auto y = s.lower_bound(-sim);
    int x = LLONG_MAX;
    if (y != s.end()) x = abs(*y + sim);
    if (y != s.begin()) x = min(x, abs(sim + *(--y)));
    cout << x << '\n';
    while (q--) {
        int l, r;
        cin >> l >> r >> x;
        if (((--r) - l) & 1) sim += ((r & 1)? -x: x);
        x = LLONG_MAX;
        y = s.lower_bound(-sim);
        if (y != s.end()) x = abs(*y + sim);
        if (y != s.begin()) x = min(x, abs(sim + *(--y)));
        cout << x << '\n';
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

const int MAXN = 100 * 1000 + 23;

int n, m, q, a[MAXN], b[MAXN], sim, kam;
set<int> s;

int main() {
    cin >> n >> m >> q;
    for (int i = 0; i < n; i++) cin >> a[i];
    for (int i = 0; i < n; i++) sim += (i & 1? -a[i]: a[i]);
    for (int i = 0; i < m; i++) cin >> b[i];
    for (int i = 0; i < n; i++) kam += (i & 1? b[i]: -b[i]);
    for (int i = n; i < m; i++) {
        s.insert(kam);
        kam += b[i - n];
        kam = -kam;
        kam += (n & 1? -b[i]: b[i]);
    }
    s.insert(kam);
    auto y = s.lower_bound(-sim);
    int x = INT_MAX;
    if (y != s.end()) x = abs(*y + sim);
    if (y != s.begin()) x = min(x, abs(sim + *(--y)));
    cout << x << '\n';
    while (q--) {
        int l, r;
        cin >> l >> r >> x;
        if (abs((--r) - l) & 1) sim += ((r & 1)? -x: x);
        x = INT_MAX;
        y = s.lower_bound(-sim);
        if (y != s.end()) x = abs(*y + sim);
        if (y != s.begin()) x = min(x, abs(sim + *(--y)));
        cout << x << '\n';
    }
    return 0;
}


#include <bits/stdc++.h>

#define int long long

using namespace std;

const int MAXN = 100 * 1000 + 23;

int n, m, q, a[MAXN], b[MAXN], sim, kam;
set<int> s;

int32_t main() {
    cin >> n >> m >> q;
    for (int i = 0; i < n; i++) cin >> a[i];
    for (int i = 0; i < n; i++) sim += (i & 1? -a[i]: a[i]);
    for (int i = 0; i < m; i++) cin >> b[i];
    for (int i = 0; i < n; i++) kam += (i & 1? b[i]: -b[i]);
    for (int i = n; i < m; i++) {
        s.insert(kam);
        kam += b[i - n];
        kam = -kam;
        kam += (n & 1? -b[i]: b[i]);
    }
    s.insert(kam);
    auto y = s.lower_bound(-sim);
    int x = INT_MAX;
    if (y != s.end()) x = abs(*y + sim);
    if (y != s.begin()) x = min(x, abs(sim + *(--y)));
    cout << x << '\n';
    while (q--) {
        int l, r;
        cin >> l >> r >> x;
        if (abs((--r) - l) & 1) sim += ((r & 1)? -x: x);
        x = INT_MAX;
        y = s.lower_bound(-sim);
        if (y != s.end()) x = abs(*y + sim);
        if (y != s.begin()) x = min(x, abs(sim + *(--y)));
        cout << x << '\n';
    }
    return 0;
}


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

#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"
#define int long long

const int N=1e5+5;

int n, m, q, sum=0;
int a[N], b[N], sufB[N];
set<int> s;

int odd(int l, int r)
{
	if(l%2==0)
		l++;
	if(r%2==0)
		r--;
	if(l>r)
		return 0;
	return 1 + (r-l)/2;
}

int even(int l, int r)
{
	if(l%2)
		l++;
	if(r%2)
		r--;
	if(l>r)
		return 0;
	return 1 + (r-l)/2;
}

int work(int val)
{
	int ans=1e18;
	auto it=s.lower_bound(val);
	if(it!=s.end())
		ans=min(ans, *it-val);
	if(it!=s.begin())
	{
		it--;
		ans=min(ans, val-*it);
	}
	return ans;
}

int32_t main()
{
	IOS;
	cin>>n>>m>>q;
	for(int i=1;i<=n;i++)
	{
		cin>>a[i];
		sum+=(i%2)?a[i]:-a[i];
	}
	for(int i=1;i<=m;i++)
		cin>>b[i];
	for(int i=m;i>=1;i--)
		sufB[i]=-b[i]-sufB[i+1];
	for(int i=1;i<=m-n+1;i++)
	{
		if(n%2)
			s.insert(sufB[i] + sufB[i+n]);
		else
			s.insert(sufB[i] - sufB[i+n]);
	}
	cout<<work(-sum)<<endl;
	while(q--)
	{
		int l, r, x;
		cin>>l>>r>>x;
		sum+=(odd(l, r) - even(l, r))*x;
		cout<<work(-sum)<<endl;
	}
	return 0;
}


#include <iostream>
#include <set>
using namespace std;
int sign(int x)
{
    if (x%2)
    return -1;
    return 1;
}
long long absll(long long x)
{
    if (x>0)
    return x;
    return -x;
}
set<long long> s;
int b[100005];
long long ans(long long x)
{
    set<long long>::iterator it=s.lower_bound(x);
    if (it==s.end())
    it--;
    long long ret=absll((*it)-x);
    if (it!=s.begin())
    it--;
    return min(ret,absll((*it)-x));
}
int main()
{
    int n,m,q;
    scanf("%d%d%d",&n,&m,&q);
    long long sumA=0;
    for (int i=0;i<n;i++)
    {
        int a;
        scanf("%d",&a);
        sumA+=a*sign(i);
    }
    long long cur=0;
    for (int i=0;i<n;i++)
    {
        scanf("%d",&b[i]);
        cur+=sign(i+1)*b[i];
    }
    s.insert(cur);
    for (int i=n;i<m;i++)
    {
        scanf("%d",&b[i]);
        cur+=b[i-n];
        cur=-cur;
        cur+=sign(n)*b[i];
        s.insert(cur);
    }
    printf("%I64d\n",ans(-sumA));
    while (q--)
    {
        int l,r,x;
        scanf("%d%d%d",&l,&r,&x);
        if ((r-l)%2==0)
        {
            if (l%2)
            sumA+=x;
            else
            sumA-=x;
        }
        printf("%I64d\n",ans(-sumA));
    }
}


#include <bits/stdc++.h>

using namespace std;
long long n, m, q, a[100002], sum, ert, x, sol[100002], sok=1000000000000000001;
vector<pair<long long, long long> > sz;
vector<long long> pos;
int main()
{
    ios_base::sync_with_stdio(false);
    cin >> n >> m >> q;
    for (long long i=1; i<=n; i++) {
        cin >> a[i];
        if (i%2==0) a[i]*=-1;
        sum+=a[i];
    }
    for (long long i=1; i<=m; i++) cin >> a[i];
    for (long long i=1;i<=n; i++) {
        if (i%2) ert+=a[i];
        else ert-=a[i];
    }
    pos.push_back(ert), pos.push_back(sok), pos.push_back(-sok);
    for (long long i=n+1; i<=m; i++) {
        if ((i-n)%2) ert-=a[i-n];
        else ert+=a[i-n];
        ert*=-1;
        if (n%2) ert+=a[i];
        else ert-=a[i];
        pos.push_back(ert);
    }
    sort(pos.begin(), pos.end());
    sz.push_back({sum, 0});
    for (long long i=1; i<=q; i++) {
        long long a, b, c;
        cin >> a >> b >> c;
        if (a%2 && b%2) sum+=c;
        if (a%2==0 && b%2==0) sum-=c;
        sz.push_back({sum, i});
    }
    sort(sz.begin(), sz.end());
    for (long long i=1; i<pos.size(); i++) {
        while(x<q+1) {
            bool c=0;
            long long fi=sz[x].first, se=sz[x].second;
            if (pos[i-1]<=fi && fi<pos[i]) sol[se]=min(pos[i]-fi, fi-pos[i-1]), x++, c=1;
            if (!c) break;
        }
    }
    for (long long i=0; i<=q; i++) cout << sol[i] << "\n";
    return 0;
}


#include <bits/stdc++.h>

using namespace std;
long long n, m, q, a[100002], sum, ert, x, sol[100002], sok=1000000000000000001;
vector<pair<long long, long long> > sz;
vector<long long> pos;
int main()
{
    ios_base::sync_with_stdio(false);
    cin >> n >> m >> q;
    for (long long i=1; i<=n; i++) {
        long long x;
        cin >> x;
        if (i%2==0) x*=-1;
        sum+=x;
    }
    for (long long i=1; i<=m; i++) cin >> a[i];
    for (long long i=1; i<=n; i++) {
        if (i%2) ert+=a[i];
        else ert-=a[i];
    }
    pos.push_back(ert), pos.push_back(sok), pos.push_back(-sok), sz.push_back({sum, 0});
    for (long long i=n+1; i<=m; i++) {
        ert-=a[i-n];
        ert*=-1;
        if (n%2) ert+=a[i];
        else ert-=a[i];
        pos.push_back(ert);
    }
    for (long long i=1; i<=q; i++) {
        long long a, b, c;
        cin >> a >> b >> c;
        if (a%2 && b%2) sum+=c;
        if (a%2==0 && b%2==0) sum-=c;
        sz.push_back({sum, i});
    }
    sort(sz.begin(), sz.end()), sort(pos.begin(), pos.end());
    for (long long i=1; i<pos.size(); i++) {
        while(x<q+1) {
            bool c=0;
            long long fi=sz[x].first, se=sz[x].second;
            if (pos[i-1]<=fi && fi<pos[i]) sol[se]=min(pos[i]-fi, fi-pos[i-1]), x++, c=1;
            if (!c) break;
        }
    }
    for (long long i=0; i<=q; i++) cout << sol[i] << "\n";
    return 0;
}


#include <bits/stdc++.h>

#define int         long long
#define uint        unsigned int
#define ld          long double
#define showoff     ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define pb          push_back
#define pii         pair<int,int>
#define FOR(i,a,b)  for(int i=a;i<b;++i)
#define RFOR(i,a,b) for(int i=a;i>b;--i)
#define f           first
#define se          second
#define maxn        200005
#define all(v)      v.begin(),v.end()
#define sz(x)       (int)x.size()
#define mod         1000000007
#define pqueue      priority_queue<pii>
#define pdqueue     priority_queue< int,vector<int> ,greater< int >>

using namespace std;

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

int power(int a,int n)
{
    a %= mod;
    if(n == 1)return a;
    if(n == 0)return 1;
    if(n%2)return (a*(power((a*a)%mod,n/2)%mod))%mod;
    return power((a*a)%mod,n/2)%mod;
}

const int inf = (int) 1e18;

int inverse(int x){
    return power(x,mod-2)%mod;//little fermat....
}
void solve(){
    int n,m,q,sum = 0;
    cin >> n >> m >> q;
    vector<int>s(m+5),a(n+5),b(m+5),neg,pos;
    FOR(i,1,n+1){
        cin >> a[i];
        if(i%2)sum += a[i];
        else sum -= a[i];
    }
    FOR(i,1,m+1)cin >> b[i];
    RFOR(i,m,0)if(i%2)s[i] = s[i+1]+b[i];
    else s[i] = s[i+1]-b[i];
    FOR(j,0,m-n+1){
        int x = s[j+1]-s[j+n+1];
        if(j%2 == 0)x *= -1;
        if(x < 0)neg.pb(-x);
        else if(x > 0)pos.pb(x);
        else neg.pb(x),pos.pb(x);
    }
    sort(neg.begin(),neg.end());
    sort(pos.begin(),pos.end());
    int l,r,x,ans = inf;
    if(sum >= 0){
        if(sz(pos))ans = sum+pos[0];
        if(sz(neg)){
            int j = lower_bound(neg.begin(),neg.end(),sum)-neg.begin();
            if(j < sz(neg))ans = min(ans,neg[j]-sum);
            if(j > 0)ans = min(ans,sum-neg[j-1]);
        }
    }
    else {
        sum *= -1;
        if(sz(neg))ans = sum+neg[0];
        if(sz(pos)){
            int j = lower_bound(pos.begin(),pos.end(),sum)-pos.begin();
            if(j < sz(pos))ans = min(ans,pos[j]-sum);
            if(j > 0)ans = min(ans,sum-pos[j-1]);
        }
    }
    cout << ans << "\n";
    while(q--){
        ans = inf;
        cin >> l >> r >> x;
        if((r-l+1)%2)sum += x;
        //cout << sum << " ";
        if(sum >= 0){
            if(sz(pos))ans = sum+pos[0];
            if(sz(neg)){
                int j = lower_bound(neg.begin(),neg.end(),sum)-neg.begin();
                if(j < sz(neg))ans = min(ans,neg[j]-sum);
                if(j > 0)ans = min(ans,sum-neg[j-1]);
            }
        }
        else {
            sum *= -1;
            if(sz(neg))ans = sum+neg[0];
            if(sz(pos)){
                int j = lower_bound(pos.begin(),pos.end(),sum)-pos.begin();
                if(j < sz(pos))ans = min(ans,pos[j]-sum);
                if(j > 0)ans = min(ans,sum-pos[j-1]);
            }
        }
        cout << ans << "\n";
    }
}

signed main()
{
    showoff;
    int T = 1;
    //cin >> T;
    FOR(t,1,T+1){
        solve();
    }
    return 0;
}
//*->for large size of matrix take int not long long if possible......
//*->always take maximum as inf for safer side ...


#include <bits/stdc++.h>

#define int         long long
#define uint        unsigned int
#define ld          long double
#define showoff     ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define pb          push_back
#define pii         pair<int,int>
#define FOR(i,a,b)  for(int i=a;i<b;++i)
#define RFOR(i,a,b) for(int i=a;i>b;--i)
#define f           first
#define se          second
#define maxn        200005
#define all(v)      v.begin(),v.end()
#define sz(x)       (int)x.size()
#define mod         1000000007
#define pqueue      priority_queue<pii>
#define pdqueue     priority_queue< int,vector<int> ,greater< int >>

using namespace std;

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

int power(int a,int n)
{
    a %= mod;
    if(n == 1)return a;
    if(n == 0)return 1;
    if(n%2)return (a*(power((a*a)%mod,n/2)%mod))%mod;
    return power((a*a)%mod,n/2)%mod;
}

const int inf = (int) 1e18;

int inverse(int x){
    return power(x,mod-2)%mod;//little fermat....
}
void solve(){
    int n,m,q,sum = 0;
    cin >> n >> m >> q;
    vector<int>s(m+5),a(n+5),b(m+5),neg,pos;
    FOR(i,1,n+1){
        cin >> a[i];
        if(i%2)sum += a[i];
        else sum -= a[i];
    }
    FOR(i,1,m+1)cin >> b[i];
    RFOR(i,m,0)if(i%2)s[i] = s[i+1]+b[i];
    else s[i] = s[i+1]-b[i];
    FOR(j,0,m-n+1){
        int x = s[j+1]-s[j+n+1];
        if(j%2 == 0)x *= -1;
        if(x < 0)neg.pb(-x);
        else if(x > 0)pos.pb(x);
        else neg.pb(x),pos.pb(x);
    }
    sort(neg.begin(),neg.end());
    sort(pos.begin(),pos.end());
    int l,r,x,ans = inf;
    if(sum >= 0){
        if(sz(pos))ans = sum+pos[0];
        if(sz(neg)){
            int j = lower_bound(neg.begin(),neg.end(),sum)-neg.begin();
            if(j < sz(neg))ans = min(ans,neg[j]-sum);
            if(j > 0)ans = min(ans,sum-neg[j-1]);
        }
    }
    else {
        sum *= -1;
        if(sz(neg))ans = sum+neg[0];
        if(sz(pos)){
            int j = lower_bound(pos.begin(),pos.end(),sum)-pos.begin();
            if(j < sz(pos))ans = min(ans,pos[j]-sum);
            if(j > 0)ans = min(ans,sum-pos[j-1]);
        }
    }
    cout << ans << "\n";
    while(q--){
        ans = inf;
        cin >> l >> r >> x;
        if((r-l+1)%2){
            if(l%2)sum += x;
            else sum -= x;
        }
        //cout << sum << " ";
        if(sum >= 0){
            if(sz(pos))ans = sum+pos[0];
            if(sz(neg)){
                int j = lower_bound(neg.begin(),neg.end(),sum)-neg.begin();
                if(j < sz(neg))ans = min(ans,neg[j]-sum);
                if(j > 0)ans = min(ans,sum-neg[j-1]);
            }
        }
        else {
            sum *= -1;
            if(sz(neg))ans = sum+neg[0];
            if(sz(pos)){
                int j = lower_bound(pos.begin(),pos.end(),sum)-pos.begin();
                if(j < sz(pos))ans = min(ans,pos[j]-sum);
                if(j > 0)ans = min(ans,sum-pos[j-1]);
            }
        }
        cout << ans << "\n";
    }
}

signed main()
{
    showoff;
    int T = 1;
    //cin >> T;
    FOR(t,1,T+1){
        solve();
    }
    return 0;
}
//*->for large size of matrix take int not long long if possible......
//*->always take maximum as inf for safer side ...


#include <bits/stdc++.h>

#define int         long long
#define uint        unsigned int
#define ld          long double
#define showoff     ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define pb          push_back
#define pii         pair<int,int>
#define FOR(i,a,b)  for(int i=a;i<b;++i)
#define RFOR(i,a,b) for(int i=a;i>b;--i)
#define f           first
#define se          second
#define maxn        200005
#define all(v)      v.begin(),v.end()
#define sz(x)       (int)x.size()
#define mod         1000000007
#define pqueue      priority_queue<pii>
#define pdqueue     priority_queue< int,vector<int> ,greater< int >>

using namespace std;

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

int power(int a,int n)
{
    a %= mod;
    if(n == 1)return a;
    if(n == 0)return 1;
    if(n%2)return (a*(power((a*a)%mod,n/2)%mod))%mod;
    return power((a*a)%mod,n/2)%mod;
}

const int inf = (int) 1e18;

int inverse(int x){
    return power(x,mod-2)%mod;//little fermat....
}
void solve(){
    int n,m,q,sum = 0;
    cin >> n >> m >> q;
    vector<int>s(m+5),a(n+5),b(m+5),neg,pos;
    FOR(i,1,n+1){
        cin >> a[i];
        if(i%2)sum += a[i];
        else sum -= a[i];
    }
    FOR(i,1,m+1)cin >> b[i];
    RFOR(i,m,0)if(i%2)s[i] = s[i+1]+b[i];
    else s[i] = s[i+1]-b[i];
    FOR(j,0,m-n+1){
        int x = s[j+1]-s[j+n+1];
        if(j%2 == 0)x *= -1;
        if(x < 0)neg.pb(-x);
        else if(x > 0)pos.pb(x);
        else neg.pb(x),pos.pb(x);
    }
    sort(neg.begin(),neg.end());
    sort(pos.begin(),pos.end());
    int l,r,x,ans = inf;
    if(sum >= 0){
        if(sz(pos))ans = sum+pos[0];
        if(sz(neg)){
            int j = lower_bound(neg.begin(),neg.end(),sum)-neg.begin();
            if(j < sz(neg))ans = min(ans,neg[j]-sum);
            if(j > 0)ans = min(ans,sum-neg[j-1]);
        }
    }
    else {
        sum *= -1;
        if(sz(neg))ans = sum+neg[0];
        if(sz(pos)){
            int j = lower_bound(pos.begin(),pos.end(),sum)-pos.begin();
            if(j < sz(pos))ans = min(ans,pos[j]-sum);
            if(j > 0)ans = min(ans,sum-pos[j-1]);
        }
    }
    cout << ans << "\n";
    while(q--){
        ans = inf;
        cin >> l >> r >> x;
        if((r-l)%2 == 0){
            if(l%2)sum += x;
            else sum -= x;
        }
        if(sum >= 0){
            if(sz(pos))ans = min(ans,sum+pos[0]);
            if(sz(neg)){
                int j = lower_bound(neg.begin(),neg.end(),sum)-neg.begin();
                if(j < sz(neg))ans = min(ans,neg[j]-sum);
                if(j > 0)ans = min(ans,sum-neg[j-1]);
            }
        }
        if(sum <= 0){
            sum *= -1;
            if(sz(neg))ans = min(ans,sum+neg[0]);
            if(sz(pos)){
                int j = lower_bound(pos.begin(),pos.end(),sum)-pos.begin();
                if(j < sz(pos))ans = min(ans,pos[j]-sum);
                if(j > 0)ans = min(ans,sum-pos[j-1]);
            }
        }
        cout << ans << "\n";
    }
}

signed main()
{
    showoff;
    int T = 1;
    //cin >> T;
    FOR(t,1,T+1){
        solve();
    }
    return 0;
}
//*->for large size of matrix take int not long long if possible......
//*->always take maximum as inf for safer side ...


#include <bits/stdc++.h>

#define int         long long
#define uint        unsigned int
#define ld          long double
#define showoff     ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define pb          push_back
#define pii         pair<int,int>
#define FOR(i,a,b)  for(int i=a;i<b;++i)
#define RFOR(i,a,b) for(int i=a;i>b;--i)
#define f           first
#define se          second
#define maxn        200005
#define all(v)      v.begin(),v.end()
#define sz(x)       (int)x.size()
#define mod         1000000007
#define pqueue      priority_queue<pii>
#define pdqueue     priority_queue< int,vector<int> ,greater< int >>

using namespace std;

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

int power(int a,int n)
{
    a %= mod;
    if(n == 1)return a;
    if(n == 0)return 1;
    if(n%2)return (a*(power((a*a)%mod,n/2)%mod))%mod;
    return power((a*a)%mod,n/2)%mod;
}

const int inf = (int) 1e18;

int inverse(int x){
    return power(x,mod-2)%mod;//little fermat....
}
void solve(){
    int n,m,q,sum = 0;
    cin >> n >> m >> q;
    vector<int>s(m+5),a(n+5),b(m+5),neg,pos;
    FOR(i,1,n+1){
        cin >> a[i];
        if(i%2)sum += a[i];
        else sum -= a[i];
    }
    FOR(i,1,m+1)cin >> b[i];
    RFOR(i,m,0)if(i%2)s[i] = s[i+1]+b[i];
    else s[i] = s[i+1]-b[i];
    FOR(j,0,m-n+1){
        int x = s[j+1]-s[j+n+1];
        if(j%2 == 0)x *= -1;
        if(x < 0)neg.pb(-x);
        else if(x > 0)pos.pb(x);
        else neg.pb(x),pos.pb(x);
    }
    sort(neg.begin(),neg.end());
    sort(pos.begin(),pos.end());
    int l,r,x,ans = inf;
    if(sum >= 0){
        if(sz(pos))ans = sum+pos[0];
        if(sz(neg)){
            int j = lower_bound(neg.begin(),neg.end(),sum)-neg.begin();
            if(j < sz(neg))ans = min(ans,neg[j]-sum);
            if(j > 0)ans = min(ans,sum-neg[j-1]);
        }
    }
    else {
        int csum = -1*sum;
        if(sz(neg))ans = csum+neg[0];
        if(sz(pos)){
            int j = lower_bound(pos.begin(),pos.end(),csum)-pos.begin();
            if(j < sz(pos))ans = min(ans,pos[j]-csum);
            if(j > 0)ans = min(ans,csum-pos[j-1]);
        }
    }
    cout << ans << "\n";
    while(q--){
        ans = inf;
        cin >> l >> r >> x;
        if((r-l)%2 == 0){
            if(l%2)sum += x;
            else sum -= x;
        }
        if(sum >= 0){
            if(sz(pos))ans = min(ans,sum+pos[0]);
            if(sz(neg)){
                int j = lower_bound(neg.begin(),neg.end(),sum)-neg.begin();
                if(j < sz(neg))ans = min(ans,neg[j]-sum);
                if(j > 0)ans = min(ans,sum-neg[j-1]);
            }
        }
        if(sum <= 0){
            int csum = -1*sum;
            if(sz(neg))ans = min(ans,csum+neg[0]);
            if(sz(pos)){
                int j = lower_bound(pos.begin(),pos.end(),csum)-pos.begin();
                if(j < sz(pos))ans = min(ans,pos[j]-csum);
                if(j > 0)ans = min(ans,csum-pos[j-1]);
            }
        }
        cout << ans << "\n";
    }
}

signed main()
{
    showoff;
    int T = 1;
    //cin >> T;
    FOR(t,1,T+1){
        solve();
    }
    return 0;
}
//*->for large size of matrix take int not long long if possible......
//*->always take maximum as inf for safer side ...


#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define mod 1000000007
#include<string.h>
#define inf 9000000000000000000
#define maxn 300006
typedef pair<ll,ll> pll;
typedef pair<int,int> pint;
#define PI 3.14159265359
#define endl '\n'
#define mapint_iterator map<int,int> :: iterator
#define mapll_iterator map<ll,ll> :: iterator
#define setint_iterator set<int> :: iterator
#define setll_iterator set<ll> :: iterator
#define setpint_iterator set<pint> :: iterator
#define setpll_iterator set<pll> :: iterator
#define trace(x) cout<<#x<<": "<<x<<" "<<endl
#define trace2(x,y) cout<<#x<<": "<<x<<" | "<<#y<<": "<<y<<endl
#define trace3(x,y,z) cout<<#x<<":" <<x<<" | "<<#y<<": "<<y<<" | "<<#z<<": "<<z<<endl
#define trace4(a,b,c,d) cout<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<endl
#define cout1(a) cout<<a<<endl
#define cout2(a,b) cout<<a<<' '<<b<<endl
#define cout3(a,b,c) cout<<a<<" "<<b<<" "<<c<<endl
#define cout4(a,b,c,d) cout<<a<<" "<<b<<" "<<c<<" "<<d<<endl
#define vcout(v,i) cout<<v[i].fi<<" "<<v[i].se<<endl
#define debug cout1("DEBUGGING")
typedef priority_queue<ll,vector<ll>,greater<ll> > pqset;
typedef priority_queue<pair<int,pint>,vector<pair<int,pint> >,greater<pair<int,pint> > > pqset_ll;
#define pb push_back
#define pf push_front
#define fi first
#define mkp make_pair
#define se second
ll dxk[]={0,0,1,-1,1,1,-1,-1};
ll dyk[]={1,-1,0,0,1,-1,1,-1};
/*
#include <ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
typedef tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update> os;
typedef tree<pll,null_type,less<pll>,rb_tree_tag,tree_order_statistics_node_update> os_pair;
*/
#define acc (ios::sync_with_stdio(false),cin.tie(0))
#define rep(i,n) for(ll i=0;i<n;i++)
#define per(i,n) for(ll i=n-1;i>=0;i--)
#define rep1(i,n) for(ll i=1;i<=n;i++)
#define per1(i,n) for(ll i=n;i>0;i--)
#define repeat(i,start,n) for(ll i=start;i<n;i++)
#define print(a,n) for(ll i=0;i<n;i++){ cout<<a[i]<<" ";}
ll ll_max(ll a,ll b,ll c){return max(a,max(b,c));}
int int_max(int a,int b,int c){return max(a,max(b,c));}
ll ll_min(ll a,ll b,ll c){return min(a,min(b,c));}
int int_min(int a,int b,int c){return min(a,min(b,c));}
ll max(int a,ll b){ return max((ll)a,b);}
ll min(int a,ll b){ return min((ll)a,b);}
ll min(ll a,int b){ return min(a,(ll)b);}
ll max(ll a,int b){ return max(a,(ll)b);}
ll dx[]={0,0,1,-1};
ll dy[]={1,-1,0,0};
ll power(ll a,ll b){
	if(a==1)
		return 1;
	if(b==0)
		return 1;
	ll c=power(a,b/2);
	ll res=1;
	if(b%2){
		res=(c*c)%mod;
		res*=a;
		res%=mod;
	}
	else
		res=((c*c)%mod);
	return res;
}
ll modInv(ll a){return power(a,mod-2)%mod;}
ll fact[1],inv[1];
void factorial(ll n){
	fact[0]=1;
	for(ll i=1;i<=n;i++){
		fact[i]=fact[i-1]*i;
		fact[i]%=mod;
	}
}
void InvFactorial(ll n){
	inv[0]=1;
	for(ll i=1;i<=n;i++)
		inv[i]=modInv(fact[i]);
}
ll ncr(ll n,ll r){
	if(n<r||n<0||r<0)
		return 0;
	ll b=inv[n-r];
	ll c=inv[r];
	ll a=fact[n]*b;
	a%=mod;
	a*=c;
	a%=mod;
	return a;
}
ll Tree[1];
void build_max(int node,int start,int end,int a[]){
	if(start==end){
		Tree[node]=a[start];
		return;
	}
	int mid=((start+end)>>1);
	build_max(2*node+1,start,mid,a);
	build_max(2*node+2,mid+1,end,a);
	//According to the question,change from here
	Tree[node]=max(Tree[2*node+1],Tree[2*node+2]);
}
void update_max(int node,int start,int end,int i,ll val){
	if(start==end){
		Tree[node]=val;
		return;
	}
	int mid=((start+end)>>1);
	if(i<=mid)
		update_max(2*node+1,start,mid,i,val);
	else
		update_max(2*node+2,mid+1,end,i,val);
	//According to the question,change from here
	Tree[node]=max(Tree[2*node+1],Tree[2*node+2]);
}
ll query_max(int node,int start,int end,int l,int r){
	if(start>end||end<l||start>r)
		return 0;//0 in case of sum , high value in case of min , low value in case of max and soooo on
	if(start>=l&&end<=r)
		return(Tree[node]);
	int mid = (start+end)/2 ;
	ll p1 = query_max(node*2+1, start, mid, l,r);
	ll p2 = query_max(node*2+2, mid+1, end , l,r);
	return max(p1,p2);
}
//ifstream cin("b_read_on.txt"); ofstream cout("output3.txt");
//Chronology: Binary Search,Greedy,dp,dfs and similar
//Use (<<) for multiplication
//Use (>>) for division
//If memory limit exceeds in top-down , try bottom up dp
//ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);cout<<fixed;cerr.tie(NULL);
// find_by_order -> value at index
// order_of_key -> index of value
// while using (1<<i) use ((ll)1<<(ll)i)
// if global declared initialise per testcase
// in Floyd-Warshall Algo, k is outer loop
//pair is initialised as {0,0}
//value of dp array is not the same in top-down & bottom-up
// If an element was not initially in map and if asked mp[a],the element gets inserted
// Dont use unordered_map until necessary
// func(int i,int j) with 0 loop has same complexity as func(int i) with 1 loop
//use hashing when no other way available
// a%=mod take a lot of time... try to use it minimum and use memset as it reduces a lot of time usage
// use if(a>=mod) a%=mod
//cout<<(double) can be harmful , always use printf(%.9llf)
//use s.erase(it++) for erasing iterator and then moving to the next one
//whether to choose ll or int , depends on time bound
//never use adj.resize(n) as value is persistent, always erase
//use __builtin_popcountll() for ll
// no of prime numbers in range : (70,19) , (1000,168) , (100000,1229) , (sqrt(10^9),3409) ;
//always check the use of segment tree using bottom-up dp
void solve(int countu){
	int n,m,q;
	cin>>n>>m>>q;
	ll a[n];
	ll b[m];
	rep(i,n)
		scanf("%lld",&a[i]);
	ll pref[m]={0};
	rep(i,m){
		scanf("%lld",&b[i]);
		if(i==0)
			pref[i]=b[i];
		else if(i%2)
			pref[i]=pref[i-1]-b[i];
		else
			pref[i]=pref[i-1]+b[i];
	}
	vector<ll> v;
	repeat(i,n-1,m){
		if((i-n+1)%2==0)
			v.pb(pref[i]-((i==n-1)?0:pref[i-n]));
		else
			v.pb(-(pref[i]-((i==n-1)?0:pref[i-n])));
	}
	sort(v.begin(),v.end());
	rep(i,n){
		if(i==0)
			pref[i]=a[i];
		else if(i%2)
			pref[i]=pref[i-1]-a[i];
		else
			pref[i]=pref[i-1]+a[i];
	}
	while(q--){
		ll p=pref[n-1];
		ll j=lower_bound(v.begin(),v.end(),p)-v.begin();
		ll ans=inf;
		if(j!=v.size())
			ans=min(ans,abs(v[j]-p));
		j--;
		if(j!=-1)
			ans=min(ans,abs(v[j]-p));
		cout1(ans);
		ll l,r,c;
		scanf("%lld%lld%lld",&l,&r,&c);
		l--;r--;
		int size=(r-l+1);
		if(size%2==0)
			continue;
		if(l%2)
			pref[n-1]-=c;
		else
			pref[n-1]+=c;
	}
	ll p=pref[n-1];
	ll j=lower_bound(v.begin(),v.end(),p)-v.begin();
	ll ans=inf;
	if(j!=v.size())
		ans=min(ans,abs(v[j]-p));
	j--;
	if(j!=-1)
		ans=min(ans,abs(v[j]-p));
	cout1(ans);
}
int main(){
	//ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);cout<<fixed;cerr.tie(NULL);
	int t=1;
	//cin>>t;
	int countu=1;
    while(t--){
    	solve(countu);
    	countu++;
    }
}