PivotOJ

Contest Struggles

시간 제한: 1000ms메모리 제한: 1024MB출처: NWERC 2020BOJ 21339

문제

Lotte is competing in a programming contest. Her team has already solved kk out of the nn 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 00 to 100100, 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 dd!"

She starts thinking about the problems her team has solved so far, and comes up with an estimate ss 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 nn and kk (2n1062\leq n\leq 10^6, 0<k<n0 < k < n), the total number of problems and the number of problems Lotte's team has solved so far.
  • One line with two integers dd and ss (0d,s1000\leq d,s \leq 100), 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 10610^{-6}.

예제

예제 1

입력
2 1
70 50
출력
90.00

예제 2

입력
10 3
80 90
출력
75.7142857

예제 3

입력
2 1
100 10
출력
impossible
코드를 제출하려면 로그인하세요.