AtCoder Beginner Contest 191
翻译中…
Problem Statement
翻译中…
Takahashi and Aoki are playing baseball. Takahashi is the pitcher, and Aoki is the batter.
Takahashi can throw an invisible pitch. When he throws it, the ball moves linearly at a constant speed $V \, \mathrm{m / s}$, and it becomes invisible between the moment $T$ seconds after throwing and the moment $S$ seconds after throwing (inclusive). The ball keeps moving when it is invisible.
If the ball is not invisible at the moment the ball is exactly $D \, \mathrm{m}$ away from Takahashi, Aoki can hit the ball. Otherwise, he cannot hit it. Can Aoki hit the ball?
翻译中…
Constraints
翻译中…
$1 \le V \le 1000$$1 \le T \lt S \le 1000$$1 \le D \le 1000$- All values in input are integers.
翻译中…
Input
翻译中…
Input is given from Standard Input in the following format:
翻译中…
V T S D
翻译中…
Output
翻译中…
If Aoki can hit the ball, print Yes; otherwise, print No.
翻译中…
样例
Input #1
10 3 5 20
Output #1
Yes
The ball is exactly $20 \, \mathrm{m}$ away from Takahashi at $2$ seconds after throwing.
On the other hand, the ball becomes invisible between $3$ and $5$ seconds (inclusive) after throwing, so Aoki can hit the ball.
Input #2
10 3 5 30
Output #2
No
Note that the ball is also invisible at $T$ seconds and $S$ seconds after throwing.
Here, the ball is exactly $D \, \mathrm{m}$ away from Takahashi at $T$ seconds after throwing, so the ball is invisible and cannot be hit by Aoki.
题目信息
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。