Quote:
actually I don't understand the problem
First thing to do is to study the problem, get some sample datasets and start to solve by hand the problem, see what make a good solution, and what makes it not good.
Study how a given solution can be improved.
Have a look at :
Integer programming - Wikipedia[
^]
Quote:
I want a complete solution to it if someone can make for me
Hope you are not in hurry. (see solution 1 for detail)