All Questions
2 questions
3
votes
1
answer
2k
views
Python program for "0-1 knapsack problem"
Here is what a knapsack/rucksack problem means (taken from Wikipedia):
Given a set of items, each with a weight and a value, determine the
number of each item to include in a collection so that ...
6
votes
1
answer
730
views
Multiple 0-1 knapsack
I have a problem were the time in minutes of N songs are given and I have to write the maximum number of time in K CDs.
Input description
The first input line consists of two positive integers N e K (...