304171: CF799A. Carrot Cakes

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

Carrot Cakes

题意翻译

## 题目描述: 一共需要烤 $n$ 个蛋糕,用一个烤箱烤 $k$ 个蛋糕需要 $t$ 分钟。现有一个烤箱,可以再用 $d$ 分钟建一个。建烤箱时正在建的烤箱不能工作,但另一个烤箱可以。问:新建烤箱烤完 $n$ 个蛋糕的时间是否比不新建要严格快(即不能等于)? ## 输入格式: 一行,四个数,分别是 $n$ , $t$ , $k$ , $d$。 ## 输出格式: 若比它要快,输出```YES```;否则输出```NO```。

题目描述

In some game by Playrix it takes $ t $ minutes for an oven to bake $ k $ carrot cakes, all cakes are ready at the same moment $ t $ minutes after they started baking. Arkady needs at least $ n $ cakes to complete a task, but he currently don't have any. However, he has infinitely many ingredients and one oven. Moreover, Arkady can build one more similar oven to make the process faster, it would take $ d $ minutes to build the oven. While the new oven is being built, only old one can bake cakes, after the new oven is built, both ovens bake simultaneously. Arkady can't build more than one oven. Determine if it is reasonable to build the second oven, i.e. will it decrease the minimum time needed to get $ n $ cakes or not. If the time needed with the second oven is the same as with one oven, then it is unreasonable.

输入输出格式

输入格式


The only line contains four integers $ n $ , $ t $ , $ k $ , $ d $ ( $ 1<=n,t,k,d<=1000 $ ) — the number of cakes needed, the time needed for one oven to bake $ k $ cakes, the number of cakes baked at the same time, the time needed to build the second oven.

输出格式


If it is reasonable to build the second oven, print "YES". Otherwise print "NO".

输入输出样例

输入样例 #1

8 6 4 5

输出样例 #1

YES

输入样例 #2

8 6 4 6

输出样例 #2

NO

输入样例 #3

10 3 11 4

输出样例 #3

NO

输入样例 #4

4 2 1 4

输出样例 #4

YES

说明

In the first example it is possible to get $ 8 $ cakes in $ 12 $ minutes using one oven. The second oven can be built in $ 5 $ minutes, so after $ 6 $ minutes the first oven bakes $ 4 $ cakes, the second oven bakes $ 4 $ more ovens after $ 11 $ minutes. Thus, it is reasonable to build the second oven. In the second example it doesn't matter whether we build the second oven or not, thus it takes $ 12 $ minutes to bake $ 8 $ cakes in both cases. Thus, it is unreasonable to build the second oven. In the third example the first oven bakes $ 11 $ cakes in $ 3 $ minutes, that is more than needed $ 10 $ . It is unreasonable to build the second oven, because its building takes more time that baking the needed number of cakes using the only oven.

Input

题意翻译

## 题目描述: 一共需要烤 $n$ 个蛋糕,用一个烤箱烤 $k$ 个蛋糕需要 $t$ 分钟。现有一个烤箱,可以再用 $d$ 分钟建一个。建烤箱时正在建的烤箱不能工作,但另一个烤箱可以。问:新建烤箱烤完 $n$ 个蛋糕的时间是否比不新建要严格快(即不能等于)? ## 输入格式: 一行,四个数,分别是 $n$ , $t$ , $k$ , $d$。 ## 输出格式: 若比它要快,输出```YES```;否则输出```NO```。

加入题单

算法标签: