...

/

Challenge: Maximum Value of the Loot

Challenge: Maximum Value of the Loot

Solve the Maximizing the Value of the Loot Problem.

We'll cover the following...

Problem


Maximizing the Value of the Loot Problem

Find the maximal value of items that fit into the backpack.

Input: The capacity of a backpack WW, as well as the weights (w1,,wn)(w_{1} ,\ldots,w_{n}) and costs (c1,,cn)(c_{1},\ldots, c_{n}) of nn different compounds.

Output: The maximum total value of fractions of items that fit into the backpack of the given capacity, i.e., the maximum value of c1f1++cnfnc_{1}·f_{1}+\ldots+c_{n}·f_{n} such that w1f1++w ...