编程介的小学生 2017-04-29 14:05 采纳率: 20.5%
浏览 713
已采纳

Painting Ellipses

An ellipse can be determined by a pair of a and b, the half lengths of its horizontal and vertical axes, respectively (as shown in Figure 1). CYJJ loves ellipses so much that she plans to paint the walls of her room with all kinds of crossed ellipses. The two ellipses share the same center and axes as shown in Figure 2.

She has to be so accurate that with any amount of paint, she wants the design to exactly use up the paint. Well, it is a good exercise to her students. So you are assigned to do this homework now.

Input
The input consists of several test cases, each occupies a line with 4 positive numbers: S, a1, b1, and a2, where S is the total area that should be painted, ai's are the half lengths of the horizontal axes of the two ellipses, and b1 is the half length of the vertical axis of the first ellipse.

Output
For each test case, output in a line the half length of the vertical axis of the second ellipse, accurate up to 2 decimal places. If it is impposible to paint a cross, print "Impossible" instead.

Sample Input:
221.43 10 5 5
314 10 10 11
Sample Output:
10.00
Impossible

  • 写回答

1条回答 默认 最新

报告相同问题?

悬赏问题

  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog
  • ¥15 Excel发现不可读取的内容