please explain me below output
sample input
9 3 10
1 3 5 1 3 5 1 3 5
1 1 1 2 2 2 3 3 3
sample output
1
please explain me below output
sample input
9 3 10
1 3 5 1 3 5 1 3 5
1 1 1 2 2 2 3 3 3
sample output
1
Here what you have to do is take exactly M colors and minimize the unused capacity that means maximize your weight in knapsack.
For this example -:
9 3 10
1 3 5 1 3 5 1 3 5
1 1 1 2 2 2 3 3 3
You have option of taking 3 colors in such a way that minimize the unused capacity, so your options will be -:
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.