object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val A, B, M = sc.nextInt()
  val as = Array.fill(A)(sc.nextInt())
  val bs = Array.fill(B)(sc.nextInt())
  val bargains = List.fill(M)(sc.nextInt() -> sc.nextInt() -> sc.nextInt()).map {
    case ((x, y), c) => as(x - 1) + bs(y - 1) - c
  }
  println(((as.min + bs.min) :: bargains).min)
}
