/*
Author: Fuadul Hasan(fuadul202@gmail.com)
BSMRSTU,Gopalganj
*/
#include<bits/stdc++.h>
using namespace std;
void    		print(int n)    {printf("%d ", n);}
void    		printl(long long n)     {printf("%I64d ", n);}
long long    	readline(){long long x;scanf("%I64d", &x);return x;}
/*
1.#define  gcd(a,b) __gcd(a,b) 2. #define  lcm(a,b) (a*b)/gcd(a,b) 3. #define  PI acos(-1.0) 4.#define  sqr(x) ((x)*(x))
5.#define  min3(a,b,c) min(a,min(b,c))6.#define  min4(a,b,c,d) min(d,min(a,min(b,c)))7.#define  max3(a,b,c) max(a,max(b,c))
8.#define  max4(a,b,c,d) max(d,max(a,max(b,c)))
*/
//.............ignore it................//
/*....... scanf.......*/
template <typename T> inline void readline(T &n) {
  n = 0; int f = 1; register int ch = getchar();
  for (; !isdigit(ch); ch = getchar()) if (ch == '-') f = -1;
  for (; isdigit(ch); ch = getchar()) n = (n << 3) + (n << 1) + ch - '0';n = n * f;}
template <typename T, typename TT> inline void readline(T &n, TT &m) { readline(n); readline(m); }
template <typename T, typename TT, typename TTT> inline void readline(T &n, TT &m, TTT &l) { readline(n, m); readline(l);}
/*..........error........*/
#define error(args...) {vector<string>_v=split(#args,',');err(_v.begin(),args);cout<<endl;}
vector<string> split(const string &s, char c) {
  vector<string>v; stringstream ss(s); string x;
  while (getline(ss, x, c))v.emplace_back(x); return move(v);
} void err(vector<string>::iterator it) {}
template<typename T, typename... Args>void err(vector<string>::iterator it, T a, Args...args) {
cout << it->substr((*it)[0] == ' ', it->length()) << " = " << a << " "; err(++it, args...);}
//............ignore it..................//
typedef   pair<int, int> ii;
typedef   std::vector<ii> vii;
#define   vi   std::vector<int>
#define   vll  std::vector<ll>
#define   all(n) n.begin(),n.end()
#define  mpsi std::map<string, int>
#define  pb                     push_back
#define  ll                     long long int
#define  nl                     printf("\n");
#define  happy          cin.tie(0);
#define  coding         ios::sync_with_stdio(false);
int dx[8]= {1,0,-1,0,-1,-1,1,1};
int dy[8]= {0,1,0,-1,-1,1,-1,1};
const int mod           = 1e9 + 7;
const int inf           = (int)2e9 + 5;
const ll  Inf           = (ll)2e18 + 5;
const int N             = 1e5 + 5;
const int N1            = 3e5 + 5;
int visa[N],visb[N];


int solve()
{
	//happy coding
	int a,b,m;
	readline(a,b,m);
	int aa[a+1],bb[b+1],mm[m+1];
	for(int i=0;i<a;i++){
		cin>>aa[i];
	}
	for(int i=0;i<b;i++){
		cin>>bb[i];
	}
	int mmm = 1e9+7;
	for(int i=0;i<m;i++){
		int x,y,z;
		cin>>x>>y>>z;
		visa[x-1] = true;
		visb[y-1] = true;
		int dam = aa[x-1]+bb[y-1]-z;
		//mm[i] = dam;
		//cout<<dam<<endl;
		 mmm = min(mmm,dam);
	}
	/*for(int i=0;i<m;i++){
		cout<<mm[i]<<" ";
	}*/
	/*int cnt = 0;
	for(int i=0;i<a;i++){
		for(int j=0;j<b;j++){
			if(!visit[i][j]){
				cnt = aa[i]+bb[j];
				mmm = min(cnt,mmm);
			}
		}
	}*/
	int mna = 1e9+7,mnb = 1e9+7;
	for(int i=0;i<a;i++){
		if(visa[i]==false){
			mna = min(mna,aa[i]);
		}
	}

	for(int i=0;i<b;i++){
		if(visb[i]==false){
			mnb = min(mnb,bb[i]);
		}
	}



	cout<<min(mmm,mna+mnb)<<endl;


	//error()
	return 0;
}

int main(){
	int test = 1, tc = 0;
	//scanf("%d", &test);//(void)getchar();
	while (test--)solve();
	return 0;
}

Measured memory_bytes: 1792