The knapsack problem is a problem in combinatorial optimization. Take set of items, each with value and two constraints (e.g. weight and volume), specify the number of items to be included in the collection, so that the total value is as large as possible and total weight and total volume is less than or equal to the given limits.
Files for tests:
- First line - 2 constraints for knapsack
- Next lines - value of thing and 2 constraints