To find out the minimum amount of fuel
There is a ship which can carry $K$ creatures at a time. There are two
types of creatures $D$ and $U$. They are to be carried from one side of
the river to the other side, with the constraint being $D$ can never be
greater than $U$ on either side of the river. The amount of fuel needed
for each trip from one side to the other side is $X$. I have to find the
minimum amount of fuel needed to carry all creatures across to the other
side. How to solve this?
example- $3, 3, 2, 10$ Output-$110$
No comments:
Post a Comment