'use strict'

const Main = (input) => {
  const M = parseInt(input.split('\n')[0].split(' ')[2])
  const a = input.split('\n')[1].split(' ').map((n) => parseInt(n))
  const b = input.split('\n')[2].split(' ').map((n) => parseInt(n))
  const aryMin = (x, y) => {return Math.min(x, y)}
  let min = a.reduce(aryMin) + b.reduce(aryMin)
  for (let i = 0; i < M; i++) {
  	const c = input.split('\n')[i + 3].split(' ').map((n) => parseInt(n))
    if (a[c[0] - 1] + b[c[1] - 1] - c[2] < min) {
      min = a[c[0] - 1] + b[c[1] - 1] - c[2]
    }
  }
  console.log(min)
}

Main(require('fs').readFileSync('/dev/stdin', 'utf8'))
