编程介的小学生 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条回答 默认 最新

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度