ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

UVA10573 Geometry Paradox【计算几何】

2020-03-04 09:41:41  阅读:423  来源: 互联网

标签:circles gray Paradox area Geometry contains two UVA10573 line


In the picture below you can see two small circles touching each other. The larger circle touches both of them. The length of the common tangent inscribed inside the larger circle is t and the radiuses of the two smaller circles are r1 and r2. The centers of the three circles are collinear. You will be given the value of r1 and r2 or the value of t. You will have to find the area that is within the larger circle but out of the two smaller circles (marked gray in the picture). If the given data is not enough to find the gray area, print the line ‘Impossible.’ in a single line
在这里插入图片描述
Input
First line of the input file contains an integer N (N ≤ 100) which denotes how many sets of inputs are there. Each of the next N lines contain a set of input.
    Each set either contains one or two integer. If it contains one integer then it is the value of t, otherwise the two values are the values of r1 and r2. All these integers are less than 100
Output
For each line of input produce one line of output. This line contains the area of the gray part if the given information is enough to find the area of the gray part. Otherwise it contains the line ‘Impossible’. The area should have four digits after the decimal point. Assume that π = 2 ∗ cos−1(0).
Sample Input
2
10 10
15 20
Sample Output
628.3185
1884.9556

问题链接UVA10573 Geometry Paradox
问题简述:(略)
问题分析
    。
    。
程序说明:(略)
参考链接:(略)
题记:(略)

AC的C++语言程序如下:

标签:circles,gray,Paradox,area,Geometry,contains,two,UVA10573,line
来源: https://blog.csdn.net/tigerisland45/article/details/104646964

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有