Tangents

题意翻译

- 给出两个圆,求出两个圆的公共切线 ### 输入: T组数据 每组一行 六个整数 x1,y1,r1,x2,y2,r2 表示第一个圆圆心(x1,y1)半径r1 第二个圆圆心(x2,y2)半径r2 (-100 <= x1,y1,x2,y2 <= 100) (0 <= r1,r2 <= 200) ### 输出 每组数据,输出多行 第一行为公切线的个数 没有输出0 , 无数条输出-1 后面若干行每行5个数sx、sy、tx、ty、l。(sx,sy)是切线与第一个圆接触的点,(tx,ty)是切线与第二个圆接触的点,l是切线的长度。输出保留5位小数。小于 2∗10−52*10^{-5}2∗10−5 的误差将被忽略。切线应按sx的升序输出,如果相同,则应按sy的升序输出。

题目描述

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=18&page=show_problem&problem=1615 [PDF](https://uva.onlinejudge.org/external/106/p10674.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10674/7f15b54e82dd37a7bd798c4e391b55d6ab6df255.png)

输入输出格式

输入格式


![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10674/1f99b14b527ba395f5b5226e2218c4541354f721.png)

输出格式


![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10674/acad0417d47f256e4d4fcbce4e48d397a231cd19.png)

输入输出样例

输入样例 #1

10 10 5 20 20 5
10 10 10 20 20 10
10 10 5 20 10 5
0 0 0 0 0 0

输出样例 #1

4
6.46447 13.53553 16.46447 23.53553 14.14214
10.00000 15.00000 20.00000 15.00000 10.00000
13.53553 6.46447 23.53553 16.46447 14.14214
15.00000 10.00000 15.00000 20.00000 10.00000
2
2.92893 17.07107 12.92893 27.07107 14.14214
17.07107 2.92893 27.07107 12.92893 14.14214
3
10.00000 5.00000 20.00000 5.00000 10.00000
10.00000 15.00000 20.00000 15.00000 10.00000
15.00000 10.00000 15.00000 10.00000 0.00000