문제
You have a diet plan for the next days (numbered from to ). During day , you need to drink exactly mL of milk. Alternatively, you can consume a biscuit instead, as a replacement for milk on that day.
Currently, you only have mL of milk and biscuits. If there is not enough milk to drink on a day and you run out of biscuits, then your diet plan stops.
Determine the maximum number of days you can maintain your diet plan.