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

signed main(){
	int A,B,M; cin>>A>>B>>M;
	vector<int> a(A),b(B);
	for(int i=0;i<A;i++)cin>>a[i];
	for(int i=0;i<B;i++)cin>>b[i];
	int ans=INT_MAX;
	for(int i=0;i<M;i++){
		int x,y,c; cin>>x>>y>>c; x--; y--;
		ans=min(ans,a[x]+b[y]-c);
	}
	ans=min(ans,*min_element(a.begin(),a.end())+*min_element(b.begin(),b.end()));

	cout<<ans<<endl;
}