unittest
{
	assert( [ "2 3 1", "3 3", "3 3 3", "1 2 1" ].parse.expand.solve == 5 );
	assert( [ "1 1 2", "10", "10", "1 1 5", "1 1 10" ].parse.expand.solve == 10 );
	assert( [ "2 2 1", "3 5", "3 5", "2 2 2" ].parse.expand.solve == 6 );
}



import std.algorithm;
import std.conv;
import std.range;
import std.stdio;
import std.typecons;

void main()
{
	stdin.byLineCopy.parse.expand.solve.writeln;
}

auto parse( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto abm = input.front.split.to!( long[] );
	input.popFront;
	auto as = input.front.split.to!( long[] );
	input.popFront;
	auto bs = input.front.split.to!( long[] );
	auto xycs = new long[ 3 ][ abm[ 2 ] ];
	foreach( ref xyc; xycs )
	{
		input.popFront;
		xyc = input.front.split.to!( long[] );
		xyc[ 0 .. 2 ] -= 1;
	}
	return tuple( as, bs, xycs );
}

auto solve( long[] as, long[] bs, long[ 3 ][] xycs )
{
	auto ans = as.reduce!min + bs.reduce!min;
	foreach( xyc; xycs )
	{
		ans = min( ans, as[ xyc[ 0 ] ] + bs[ xyc[ 1 ] ] - xyc[ 2 ] );
	}
	return ans;
}
