#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)n;i++)


int main() {
	int A, B, C;
	cin >> A >> B >> C;
	
	vector<int> ac(A);
	vector<int> bc(B);

	int minA = 1<<30, minB = 1<<30;
	rep(i, A) {
		cin >> ac.at(i);
		minA = min(minA, ac.at(i));
	}
	rep(j, B) {
		cin >> bc.at(j);
		minB = min(minB, bc.at(j));
	}

	int ans = minA + minB;

	rep(i, C) {
		int m;
		int tmp=0;
		cin >> m;
		tmp += ac.at(m-1);
		cin >> m;
		tmp += bc.at(m - 1);
		cin >> m;
		tmp -= m;
		ans = min(ans, tmp);
	}
	cout << ans << endl;
}
#include <iostream>
#include <algorithm>

using namespace std;

int main(){
  int A, B, M;
  cin >> A >> B >> M;
  int a[A], b[B], c[M];
  for (int i = 0; i < A; i++){
    cin >> a[i];
  }

  for (int i = 0; i < B; i++){
    cin >> b[i];
  }

  for (int i = 0; i < M; i++){
    int x, y;
    cin >> x >> y >> c[i];
    c[i] = a[x-1] + b[y-1] - c[i];
  }

  sort(a, a+A);
  sort(b, b+B);
  sort(c, c+M);

  if (a[0] + b[0] > c[0]){
    printf("%d\n", c[0]);
  }else{
    printf("%d\n", a[0] + b[0]);
  }
  
  
  
}
