import Control.Monad
import qualified Data.ByteString.Char8 as BS
import Data.Maybe
import Data.List

readInt = fromIntegral . fst . fromJust . BS.readInteger
readIntList = map readInt . BS.words

getInt = readInt <$> BS.getLine
getIntList = readIntList <$> BS.getLine
getIntNList n = map readIntList <$> replicateM (fromIntegral n) BS.getLine

calc :: [Int] -> [Int] -> [[Int]] -> Int -> Int
calc as bs [] x = x
calc as bs (cs:css) x | val < x = calc as bs css val
                      | otherwise = calc as bs css x
  where
    val = as !! (cs !! 0 - 1) + bs !! (cs !! 1 - 1) - cs !! 2

main = do
  [a, b, m] <- getIntList
  as <- getIntList
  bs <- getIntList
  css <- getIntNList m
  let as' = sort as
  let bs' = sort bs
  let noCoupon = head as' + head bs'
  print $ calc as bs css noCoupon
  
