#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i,n) for(int i=0;i<n;i++)
const ll MOD=1000000007;
const long double PI=3.14159265358979;
const ll MAX=0;

int main() {
  ll a,b,m;
  cin>>a>>b>>m;
  ll A[a];ll B[b];ll Maxa=MOD,Maxb=MOD;
  rep(i,a){
    cin>>A[i];
    Maxa=min(Maxa,A[i]);
  }
  rep(i,b){
    cin>>B[i];
    Maxb=min(Maxb,B[i]);
  }
  ll ans=Maxa+Maxb;
  rep(i,m){
    ll x,y,c;
    cin>>x>>y>>c;
    ans=min(ans,A[x-1]+B[y-1]-c);
  }
  cout<<ans;
}

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

int main(){
  int A,B,M;
  cin >> A >> B >> M;
  
  vector<int> a(A);
  vector<int> b(B);
  
  for(int i=0;i<A;i++){
    cin >> a[i];
  }
  for(int i=0;i<B;i++){
    cin >> b[i];
  }
  
  vector<vector<int>> ju(M,vector<int>(3));
  
  for(int i=0;i<M;i++){
    for(int j=0;j<3;j++){
      cin >> ju[i][j];
    }
  }
  
  int c=200000;
  
  for(int i=0;i<M;i++){
    c=min(c,a[ju[i][0]-1]+b[ju[i][1]-1]-ju[i][2]);
  }
  
  sort (a.begin(),a.end());
  sort (b.begin(),b.end());
  
  c=min(c,a[0]+b[0]);
  
  cout << c << endl;
}
