logo AlgoBeat OnlineJudge
登录 注册

#217032. [NWERC 2020] Contest Struggles

内存限制:512 MiB 时间限制:1000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

Lotte is competing in a programming contest. Her team has already solved out of the problems in the problem set, but as the problems become harder, she begins to lose focus and her mind starts to wander.

She recalls hearing the judges talk about the difficulty of the problems, which they rate on an integer scale from to , inclusive. In fact, one of the judges said that "the problem set has never been so tough, the average difficulty of the problems in the problem set is !"

She starts thinking about the problems her team has solved so far, and comes up with an estimate for their average difficulty. In hope of gaining some motivation, Lotte wonders if she can use this information to determine the average difficulty of the remaining problems.

输入格式

The input consists of:

  • One line with two integers and (, ), the total number of problems and the number of problems Lotte's team has solved so far.

  • One line with two integers and (), the average difficulty of all the problems and Lotte's estimate of the average difficulty of the problems her team has solved.

输出格式

Assuming Lotte's estimate is correct, output the average difficulty of the unsolved problems, or "impossible" if the average difficulty does not exist. Your answer should have an absolute or relative error of at most .

样例

样例输入 1

2 1
70 50

样例输出 1

90.00

样例输入 2

10 3
80 90

样例输出 2

75.7142857

样例输入 3

2 1
100 10

样例输出 3

impossible