"use strict"
function main(arg) {
    var data = arg.trim().split("\n")
    var tmp = data.shift().split(" ").map(Number)
    var A = tmp[0]
    var B = tmp[1]
    var M = tmp[2]
    var a = data.shift().split(' ').map(Number)
    var b = data.shift().split(' ').map(Number)
    var min_a = Math.min.apply(null, a);
    var min_b = Math.min.apply(null, b);
    var ans = 0
    for (var i = 0; i < data.length; i++) {
        var row = data[i].split(' ').map(Number)
        var x = row[0]
        var y = row[1]
        var c = row[2]
        var _x = a[x - 1]
        var _y = b[y - 1]
        var d = _x + _y - c
        if (i === 0) {
            ans = d
        }
        // console.log(ans)
        ans = Math.min(ans, d)
    }
    console.log(Math.min(ans, min_a + min_b))
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));