
object Main extends App {
  val sc = new java.util.Scanner(System.in) 
  val A = sc.nextInt()
  val B = sc.nextInt()
  val M = sc.nextInt()  
  sc.useDelimiter("\n")
  val a = sc.next().split(' ').map(_.toInt).toList 
  val b = sc.next().split(' ').map(_.toInt).toList
  val m = (1 to M).map(_ => sc.next().split(' ').map(_.toInt))
    .map(l => a(l(0)-1) + b(l(1)-1) - l(2))
  var ans = (a.min + b.min).min(m.min)
  println(ans)
}