
private fun readLn() = readLine()!! // string line
private fun readInt() = readLn().toInt() // single int
private fun readLong() = readLn().toLong() // single int
private fun readStrings() = readLn().split(" ") // list of strings
private fun readInts() = readStrings().map { it.toInt() } // list of ints

fun main(args: Array<String>) {

    var (A, B, N) = readInts()
    val a = readInts()
    val b = readInts()
    val x = (0 until N).map {
        readInts()
    }
    var best = a.min()!! + b.min()!!
    best = Math.min(best,
        x.map {
            sx -> a[sx[0] - 1] + b[sx[1] - 1] - sx[2]
        }.min()!!
    )
    println(best)
}

/*
1 1 5 -> 3
1 5 1 -> 2
5 1 1 -> 1
 */
