#include <cstdio>
#include <cstdlib>
#include <cassert>
#include <algorithm>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define repi(i,a,b) for(ll i=(a);i<(b);++i)
#define rep(i,a) repi(i,0,a)
#define repdi(i,a,b) for(ll i=(a)-1;i>=(b);--i)
#define repd(i,a) repdi(i,a,0)
#define itr(it,a) for( auto it = (a).begin(); it != (a).end(); ++it )
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin(), (a).rend()

using ll = long long;
using P = std::pair<ll, ll>;

constexpr ll INF = 1ll<<60;

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

template<class S, class T>
std::ostream& operator<< ( std::ostream& out, const std::pair<S,T>& a )
{ std::cout << '(' << a.first << ", " << a.second << ')'; return out; }

template<class T>
std::ostream &operator<< ( std::ostream& out, const std::vector<T>& a )
{ std::cout << '['; rep( i, a.size() ){ std::cout << a[i]; if( i != a.size()-1 ) std::cout << ", "; } std::cout << ']'; return out; }

ll A, B, M;
ll a[100010], b[100010];
ll mi = INF;
std::vector<P> cost[100010];

int main()
{
  std::cin >> A >> B >> M;

  rep( i, A )
    std::cin >> a[i];

  rep( i, B )
    std::cin >> b[i], chmin( mi, b[i] );

  rep( i, M ) {
    ll x, y, c;
    std::cin >> x >> y >> c;
    --x; --y;
    cost[x].emplace_back( y, c );
  }

  ll ans = INF;

  rep( i, A ) {
    chmin( ans, a[i]+mi );

    for( auto p : cost[i] )
     chmin( ans, a[i]+b[p.first]-p.second );
  }

  std::cout << ans << std::endl;

  return 0;
}
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define int long long
int hmt() {int x=0;int c=getchar(),n=0;for(;!isdigit(c);c=getchar()) n=(c=='-');for(;isdigit(c);c=getchar()) x=x*10+c-'0';if(n) x=-x;return x;}
#define in hmt()
#define ins ({string x;char c=getchar();for(;c==' '||c=='\n';c=getchar());for(;c!=' '&&c!='\n';c=getchar()) x+=c;x;})
#define forinc(i,a,b) for(int i=a,_b=b;i<=_b;++i)
#define fordec(i,a,b) for(int i=a;i>=b;--i)
#define forb(i,BS) for(int i=BS._Find_first();i< BS.size();i = BS._Find_next(i))
#define forv(a,b) for(auto &a:b)
#define pb push_back
#define pii pair<int,int>
#define fi first
#define se second
#define all(a) a.begin(),a.end()
#define reset(f,x) memset(f,x,sizeof(f))
#define bit(x,i) ((x>>(i-1))&1)
#define onbit(x,i) (x|(1<<(i-1)))
#define offbit(x,i) (x&~(1<<(i-1)))
const int N=200010;
int n,Q,A,B,a[N],oo,s[N],f[N],ans;
struct bit
{
	int t[N];
	void rs()
	{
	    reset(t,127);oo=t[0];
	}
	void upd(int i,int x)
	{
		for(;i<=n;i+=i&-i) t[i]=min(t[i],x);
	}
	int get(int i)
	{
		int g=oo;
		for(;i;i-=i&-i) g=min(g,t[i]);
		return g;
	}
}T[2];
void add(int i,int x)
{
	T[0].upd(i,x-i);
	T[1].upd(n-i+1,i+x);
}
main()
{
    //freopen("C.inp","r",stdin);
	n=in,Q=in,A=in,B=in;
	forinc(i,1,Q) a[i]=in;
	forinc(i,2,Q) s[i]=s[i-1]+abs(a[i]-a[i-1]);
	T[0].rs();T[1].rs();
	add(B,abs(A-a[1]));
	add(A,abs(B-a[1]));
	ans=s[Q]+min(abs(A-a[1]),abs(B-a[1]));
	forinc(i,2,Q)
	{
		f[i]=min(T[0].get(a[i])+a[i],T[1].get(n-a[i]+1)-a[i])+s[i-1];
		add(a[i-1],f[i]-s[i]);
		ans=min(ans,f[i]+s[Q]-s[i]);
	}
	cout<<ans<<"\n";
}
