编程介的小学生 2017-03-27 05:41 采纳率: 20.5%
浏览 771
已采纳

Satan. Go Away

watashi is a sport lover and he selects different kind of PE every semester. Usually he is satisfied with his choose, but this term, after the first badminton class started, he gets mad with the teacher "Satan. ChenTooBad" at his snap at the students with no reason at the first sight of them.

watashi will revenge to "Satan. ChenTooBad"'s impertinence. Finally, the end of semester comes, the students have right to estimate the teacher. That's the revenge moment, watashi thought.

Each student can give an integer mark form 1 to N to the teacher he/she is estimating. A teacher's rating is the average of marks given by students rounded to 0.1 (for example, 8.34 is rounded to 8.3, and 8.65 and 8.68 are rounded to 8.7). watashi knows "Satan. ChenTooBad" has been valued by M visitors and its current rating is K (rounded).

If a teacher's rating is not greater than L, he/she will be fired. Evil watashi wants to drag "Satan. ChenTooBad" out of his university as the final revenge.

Now watashi only knows the four numbers, can you help watashi to determine how many votes watashi must cast in order to achieve the revenge (assure that Satan will be fired).

Input

Each block has only one line. It contains four numbers N, K, L and M. The numbers K, L are given with one fractional digit. 1 <= N <= 100. 1 <= K, L <= N. 1 <= M <= 1000000.

You can make sure that the input is always valid (K is achievable by M visitors).

Output

Output the minimal number of estimates that guarantee that "Satan. ChenTooBad "will be fired. If it is impossible to achieve, just output "-1".

Sample Input

10 5.1 4.6 50
Sample Output

7

  • 写回答

2条回答 默认 最新

  • threenewbee 2017-04-05 15:42
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 回答4f系统的像差计算
  • ¥15 java如何提取出pdf里的文字?
  • ¥100 求三轴之间相互配合画圆以及直线的算法
  • ¥100 c语言,请帮蒟蒻写一个题的范例作参考
  • ¥15 名为“Product”的列已属于此 DataTable
  • ¥15 安卓adb backup备份应用数据失败
  • ¥15 eclipse运行项目时遇到的问题
  • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
  • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
  • ¥15 自己瞎改改,结果现在又运行不了了