When there's two places to rent, you can increase the first place's years above the number of years being considered. This leads to the last place having negative years.
Reproduction Steps
Add a place
Set years renting of first place to more than the number of years being considered.
Solution
Each place rented should have a maximum for the years it can be rented. The maximum years should be not make the last place go negative.
Problem
When there's two places to rent, you can increase the first place's years above the number of years being considered. This leads to the last place having negative years.
Reproduction Steps
Solution
Each place rented should have a maximum for the years it can be rented. The maximum years should be not make the last place go negative.