let input = readLine()!.characters.split(" ").map{Int(String($0))!}
let (A, B, M) = (input[0], input[1], input[2])
let a = readLine()!.characters.split(" ").map{Int(String($0))!}
let b = readLine()!.characters.split(" ").map{Int(String($0))!}
let m = (0..<M).map{_ in readLine()!.characters.split(" ").map{Int(String($0))!}}

var ans = a.minElement()! + b.minElement()!
for i in m {
  ans = min(ans, a[i[0]-1]+b[i[1]-1]-i[2])
}

print(ans)