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

int n,m,k;
const int N = 1e5+5;
int a[N],b[N];

int main() {
    ios::sync_with_stdio(0);
	cin>>n>>m>>k;
	int M = 1e9;
	for(int i=0;i<n;i++) {
		cin>>a[i];
		M = min(a[i],M);
	}
	int ans = M;
	M = 1e9;
	for(int i=0;i<m;i++) {
		cin>>b[i];
		M = min(b[i],M);
	}
	ans += M;
	while(k--) {
		int x,y,c;
		cin>>x>>y>>c;
		x--, y--;
		ans = min(a[x]+b[y]-c,ans);
	}
	cout<<ans<<endl;
    return 0;
}
