
function Main(arg)
{
  var A = arg.split("\n")[0].split(" ")[0]-0;
  var B = arg.split("\n")[0].split(" ")[1]-0;
  var M = arg.split("\n")[0].split(" ")[2]-0;


  var reizouko = arg.split("\n")[1].split(" ").map(Number);
  var renzi = arg.split("\n")[2].split(" ").map(Number);
  var waribiki = arg.split("\n").slice(3);
  var min = 1000000;
  var a =  0;
  var b = 0;
  for (var i = 0; i < M; i++){
    a = waribiki[i].split(" ")[0] - 0;
    b = waribiki[i].split(" ")[1] - 0;
    var tmp = waribiki[i].split(" ")[2] - 0;
    var c = reizouko[a - 1];
    var d = renzi[b - 1];
    if (c + d - tmp < min) {
      min = c + d - tmp;
    }
  }

  var reizouko_min = reizouko.reduce((x,y)=>x<y?x:y);
  var renzi_min = renzi.reduce((x,y)=>x<y?x:y);

  console.log(Math.min(min, reizouko_min + renzi_min));

  return;
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));