local mmi, mma = math.min, math.max
a, b, m = io.read("*n", "*n", "*n")
x = {}
y = {}
xmin, ymin = 1000000007, 1000000007
for i = 1, a do
  x[i] = io.read("*n")
  xmin = mmi(xmin, x[i])
end
for i = 1, b do
  y[i] = io.read("*n")
  ymin = mmi(ymin, y[i])
end
ret = xmin + ymin
for i = 1, m do
  xi, yi, c = io.read("*n", "*n", "*n")
  ret = mmi(ret, x[xi] + y[yi] - c)
end
print(ret)