object Main extends App {
  val List(a,b,m) = readLine.split(" ").map(_.toInt).toList
  val la = readLine.split(" ").map(_.toInt).toList
  val lb = readLine.split(" ").map(_.toInt).toList
  
  var min = la.min + lb.min
  for(i <- 1 to m){
    val s = readLine.split(" ").map(_.toInt).toList
    val tmp = la( s(0)-1 ) + lb( s(1)-1 ) - s(2)
    if(tmp < min) min = tmp                        
  }
  println(min)
}