Diet Plan
면접 대비시간 제한1초메모리 제한2048 MB
매일 P_i mL의 우유나 비스킷 하나가 필요하다. 우유 M mL와 비스킷 K개로 며칠까지 식단을 유지할 수 있는지 구한다.
문제
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.
입력
The first line consists of three integers (; ).
The next line consists of integers ().
출력
Output a single integer representing the maximum number of days you can maintain your diet plan.