No.1223 I hate Golf
タグ : / 解いたユーザー数 458
作問者 :
kichi2004_
Original Source
Problem Statement
Consider a one-dimensional world.
Chawanmushi-kun is at coordinate $0$ and can move a distance of $K$ in $1$ minute. Here, "can move a distance of $K$" means that when Chawanmushi-kun is at coordinate $t$, he can move to any coordinate from $t-K$ to $t+K$.
Now, Chawanmushi-kun wants to go to the tax office. The tax office is at coordinate $N$, and if he cannot reach it within the remaining $T$ minutes, he will be deported.
Determine whether Chawanmushi-kun can reach the tax office within $T$ minutes.
Constraints
- All inputs are integers
- $-10^9 \le N \le 10^9$
- $1 \le K \le 10^9$
- $1 \le T \le 10^9$
Input
$N\ \ K\ \ T$
$N,K,T$ are given on $1$ line, separated by spaces.
Output
Print Yes on $1$ line if Chawanmushi-kun can reach the tax office within $T$ minutes, and No if he cannot.
Print a newline at the end.
Sample
Sample 1
Input
8 3 4
Output
Yes
Moving in the positive direction, he can reach coordinate $8$ in $3$ minutes, so he makes it in time.
Sample 2
Input
-10 4 2
Output
No
Even moving at full speed in the negative direction, he cannot get beyond coordinate $-8$ in $2$ minutes.
Sample 3
Input
1000000000 999999999 1
Output
No
With just $1/999999999$ more minutes, he could have avoided being deported...
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。