Problem 3947 · Medium

Maximum Number of Items From Sale II

Spend a budget on item copies where some copies earn a free copy of a related type, and maximize the total with a budget knapsack.

Open the interactive visualisation