fun main(args: Array<String>) = hitachi2020b()

fun hitachi2020b() {
    val (a, b, m) = readLine()!!.split(' ').map { it.toInt() }
    val aList = readLine()!!.split(' ').map { it.toInt() }
    val bList = readLine()!!.split(' ').map { it.toInt() }
    val xycList = (1..m).map { readLine()!!.split(' ').map { it.toInt() } }

    val aMin = aList.min()!!
    val bMin = bList.min()!!

    var answer = aMin + bMin

    for ((x, y, c) in xycList) {
        answer = Math.min(answer, aList[x - 1] + bList[y - 1] - c)
    }

    println(answer)
}
