{ NOTE: it is recommended to use this even if you don't understand the following code. } { constraints } const MAXD = 500000; MAXP = 500000; MAXE = 500000; { input data } var D, P, E, i : longint; A : array[0..(MAXD+MAXP)-1] of longint; T, ID : array[0..MAXE-1] of longint; begin { uncomment the following lines if you want to read/write from files assign(input, 'input.txt'); reset(input); assign(output, 'output.txt'); rewrite(output); } readln(D, P, E); for i:=0 to D+P-1 do read(A[i]); readln(); for i := 0 to E-1 do readln(T[i], ID[i]); { insert your code here } writeln(42); { print result } end.