local a, b, m = io.read("*n", "*n", "*n")
local at = {}
local bt = {}
local mina, minb = 0, 0
for i = 1, a do
  at[i] = io.read("*n")
  if i == 1 then mina = at[1]
  elseif at[i] < mina then mina = at[i] end
end
for i = 1, b do
  bt[i] = io.read("*n")
  if i == 1 then minb = bt[1]
  elseif bt[i] < minb then minb = bt[i] end
end
local ret = mina + minb
for i = 1, m do
  local x, y, c = io.read("*n", "*n", "*n")
  local r = at[x] + bt[y] - c
  ret = math.min(ret, r)
end
print(ret)
