import std.algorithm;
import std.conv;
import std.math;
import std.range;
import std.stdio;
import std.string;
import std.typecons;

int[] ra (int n) {
  auto a = new int[n];
  foreach (i; 0 .. n) readf (" %d", &a[i]);
  return a;
}

int minE (int[] a) {
  int res = int.max;
  foreach (x; a) res = min (res, x);
  return res;
}

void main() {
  int na, nb, m;
  readf (" %d %d %d", &na, &nb, &m);
  auto a = ra (na);
  auto b = ra (nb);
  //a[i] + b[j] - c[i,j] -> minimize
  //a[0] + b[0]
  int res = minE (a) + minE (b); 
  foreach (k; 0 .. m) {
    int i, j, w;
    readf (" %d %d %d", &i, &j, &w);
    res = min (res, a[i-1] + b[i-1] - w);
  }
  writeln (res);
}

