After that, the problem started looking like a Knapsack / Dynamic Programming problem: Cost = item price Value = total copies obtained vi. My first DP solution worked correctly but ran into TLE due to ...