local A, B, M = io.read("*n", "*n", "*n")
local a, b = {}, {}
for i = 1, A do
    a[i] = io.read("*n")
end
for i = 1, B do
    b[i] = io.read("*n")
end

local min_value = a[1]+b[1]
for i = 1, M do
    local x, y, c = io.read("*n", "*n", "*n")
    min_value = math.min(min_value, a[x] + b[y] - c)
end

print(min_value)