Orecart Boba Easy
면접 대비시간 제한1초메모리 제한2048 MB
오레카트보다 앞서지 않으면서 최대 속도 v로 이동하는 사람이 증가하는 위치의 정류장마다 정해진 대기 시간을 채우고 모든 정류장을 들러 오레카트와 동시에 도착할 수 있는지 판정한다.
문제
The only difference between this version and the hard version is that in this version, the maximum speed is provided as input.
Eugin and Kelly are celebrating E-Days at the Colorado School of Mines by participating in the annual Orecart Pull. This is an event where everyone walks the Orecart down Colfax Avenue all the way to downtown Denver. Eugin and Kelly can go faster than the group, so they have decided to break off and grab boba from every stop along the route!
The walk is meters long, and the Orecart moves at a constant speed of meter per second. Eugin and Kelly can run at a speed of at most meters per second, but they are not allowed to move ahead of the Orecart at any time.
There are boba stops along the route, the -th of which is located at distance along the route. Additionally, at the -th boba stop, they must wait at least seconds to receive their boba before continuing.
Eugin and Kelly need to visit all boba stops while ensuring that they reach the end at exactly the same time as the Orecart. Can they accomplish this?
입력
The input consists of multiple lines:
- The first line contains two integers and ---the number of boba stops and the length of the route.
- The second line contains integers ---the distances at which each of the boba stops are located.
- The third line contains integers ---the waiting times at each boba stop.
- The fourth line contains a single integer ---the maximum speed at which Eugin and Kelly can run.
출력
Print YES if it is possible for Eugin and Kelly to visit every boba stop and reach the end at exactly the same time as the Orecart. Otherwise, print NO.