当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

3895:Find the Circle

题目描述
Given three circles (center of them are not co-linear), your job is to find a circle that is tangent with all these three circles. However, the circle might be not unique, as they can be either externally or internally tangent to each other. To make it clearer, you have to give the answer in some specific model. For example, you might be asked to give a circle which should be internally tangent with circle 1 and circle 2, while externally tangent with circle 3.
输入解释
The first line of input contains an integer n, which is the number of test cases. Each case have three lines, each have four integers x, y, r, m. (0 <= x, y <= 10000 and 0 <= r <= 500), where x, y is position of one circle, and r is the radius. m represents the model of circle you should give. m = 0 means your circle should internally tangent with this circle, and m = 1 for externally case.
输出解释
Output x, y, r in one line (accurate to 10^ (-4)). The circle required may not exist. If it is a point(r = 0), just output a point with x and y, do not output r (which is zero). If you just even cannot find a point, too, just output "NO SOLUTION!"
输入样例
2
1 3 2 0
0 1 5 0
1 0 1 0
3 5 20 1
2 1 1 1
4 4 1 1
输出样例
-0.4904 2.2264 3.6792
NO SOLUTION!
来自杭电HDUOJ的附加信息
Recommend

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-3895

最后修改于 2020-10-25T23:08:03+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 32768/32768K(Java/Others)