As a superhero, you possess a remarkable eye with a range of optional functions labeled from
Your objective is not to defeat all the supervillains but rather to strategize in a way that maximizes your profits.
The first line contains two integers
Then
The last line contains
The first line contains labels of supervillains to be defeated.
The second line contains labels of functions to be installed.
The last line contains a single integer, denoting the maximized profit.
If there are multiple best strategies, output any.
2 3
10 2 1 2
25 2 2 3
5 6 7
1 2
1 2 3
17
For all testcases: