#include<iostream>
using namespace std;

int main(){
	int A,B,M;
	int a[100000];
	int b[100000];
	int x;
	int y;
	int c;
	int mina=10000000;
	int minb=10000000;
	int mins=0;
	cin>>A>>B>>M;
	int i=0;
	for(i=0;i<A;i++){
		cin>>a[i];
		if(a[i]<mina) mina=a[i];
		
	}
	for(i=0;i<B;i++){
		cin>>b[i];
		if(b[i]<minb) minb=b[i];
	}
	mins=mina+minb;
	for(i=0;i<M;i++){
		cin>>x>>y>>c;
		if(a[x-1]+b[y-1]-c<mins) mins=a[x-1]+b[y-1]-c;
	}
	cout<<mins ;
}