Easy15 pts
Electronics Shop
Budget b. Keyboards k[], drives d[]. Max (k[i]+d[j])<=b. If none affordable: -1.
Input
b n m\nk[]\nd[]
Output
Max total or -1.
Sample
10 2 3 3 1 5 2 8
Expected
9
Loading editor…
Output
No output yet. Run your code to see results.