// inputに入力データ全体が入る
function Main(input) {
    var A = input[0].split(" ")[0];
    var B = input[0].split(" ")[1];
    var M = input[0].split(" ")[2];
    var amap = [];
    var bmap = [];
    var amin = bmin = 100000000;
    input[1].split(" ").forEach((v,i)=>{
        v = v-0;
        amap[i+1] = v;
        amin = Math.min(amin, v);
    });
    input[2].split(" ").forEach((v,i)=>{
        v = v-0;
        bmap[i+1] = v;
        bmin = Math.min(bmin, v);
    });

    var ans = amin+bmin;
    input.filter((v,i)=>i>2).map(v=>{
        var a = v.split(" ")[0]-0;
        var b = v.split(" ")[1]-0;
        var c = v.split(" ")[2]-0;
        ans = Math.min(amap[a]+bmap[b]-c, ans);
    });
    console.log(ans);


}



Main(require("fs").readFileSync("/dev/stdin", "utf8").trim().split("\n"));