import Control.Monad
import Data.Array.Unboxed

readInts :: IO [Int]
readInts = map read . words <$> getLine

main :: IO ()
main = do
  [a, b, m] <- readInts
  as <- listArray (1, a) <$> readInts
  bs <- listArray (1, b) <$> readInts
  xycs <- replicateM m readInts
  print $ solve as bs xycs

solve :: UArray Int Int -> UArray Int Int -> [[Int]] -> Int
solve as bs xycs = (a0 + b0) `min` (minimum [ (as ! x) + (bs ! y) - c | [x, y, c] <- xycs ])
  where
    a0 = foldr1 min $ elems as
    b0 = foldr1 min $ elems bs