I have a rough solution to an optimization problem using dynamic programming. The aim is to get the shortest time to achieve the most satisfaction, with each item having ind