P2998 [USACO10NOV] Candy S
Description
Farmer John knows that Bessie loves to eat candy. FJ has N (1
Input Format
\* Line 1: Four space-separated integers: N, Nopt, F, and M
\* Lines 2..Nopt+1: Line i+1 contains a single integer: C\_i
\* Lines Nopt+2..Nopt+F+1: Line i+Nopt+1 contains a single integer: FN\_i
Output Format
\* Line 1: A single integer, denoting the maximum amount of candies Bessie can eat, or -1 if Bessie can eat an infinite amount of candy.