#include<bits/stdc++.h>
using namespace std;
int A,B,M,mina=INT_MAX,minb=INT_MAX,a[233333],b[233333],x,y,c,ans;
int main(){
	scanf("%d%d%d",&A,&B,&M);
	for(int i=1;i<=A;i++)scanf("%d",&a[i]),mina=min(mina,a[i]);
	for(int i=1;i<=B;i++)scanf("%d",&b[i]),minb=min(minb,b[i]);
	ans=mina+minb;
	while(M--){
		scanf("%d%d%d",&x,&y,&c);
		ans=min(ans,a[x]+b[y]-c);
	}
	printf("%d\n",ans);
}