Codeforces Round 236 (Div. 2)
A
Nuts
Codeforces
1100
原题
←B →
翻译中…

You have $*a*$ nuts and lots of boxes. The boxes have a wonderful feature: if you put $*x*$ $(*x* ≥ 0)$ divisors (the spacial bars that can divide a box) to it, you get a box, divided into $*x* + 1$ sections.

翻译中…

You are minimalist. Therefore, on the one hand, you are against dividing some box into more than $*k*$ sections. On the other hand, you are against putting more than $*v*$ nuts into some section of the box. What is the minimum number of boxes you have to use if you want to put all the nuts in boxes, and you have $*b*$ divisors?

翻译中…

Please note that you need to minimize the number of used boxes, not sections. You do not have to minimize the number of used divisors.

翻译中…

Input

翻译中…

The first line contains four space-separated integers $*k*$, $*a*$, $*b*$, $*v*$ ($2 ≤ *k* ≤ 1000$; $1 ≤ *a*, *b*, *v* ≤ 1000$) — the maximum number of sections in the box, the number of nuts, the number of divisors and the capacity of each section of the box.

翻译中…

Output

翻译中…

Print a single integer — the answer to the problem.

翻译中…

Note

翻译中…

In the first sample you can act like this:

翻译中…
  • Put two divisors to the first box. Now the first box has three sections and we can put three nuts into each section. Overall, the first box will have nine nuts.
  • Do not put any divisors into the second box. Thus, the second box has one section for the last nut.
翻译中…

In the end we've put all the ten nuts into boxes.

翻译中…

The second sample is different as we have exactly one divisor and we put it to the first box. The next two boxes will have one section each.

翻译中…

样例

Input #1
3 10 3 3
Output #1
2
InputCopy OutputCopy
Input #2
3 10 1 3
Output #2
3
InputCopy OutputCopy
Input #3
100 100 1 1000
Output #3
1
InputCopy OutputCopy
题目信息
题号
402A
时间限制
1 s
内存限制
256 MB
标签
贪心
数学

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。