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

int main()
{
	ll a,b,m;
	cin>>a>>b>>m;
	ll ar[a],br[b];
	for(ll i=0;i<a;i++)
	{
		cin>>ar[i];
	}
	ll ma=*min_element(ar,ar+a);
	for(ll j=0;j<b;j++)
	{
		cin>>br[j];
	}
		ll mb=*min_element(br,br+b),o=ma+mb;
	for(ll i=0;i<m;i++)
	{
		ll x,y,z;
		cin>>x>>y>>z;
		o=min(o,ar[x-1]+br[y-1]-z);
	}
	cout<<o<<endl;
}