00E-2. Two Circles
Имя входного файла: | circles.in |
Имя выходного файла: | circles.out |
Ограничение по времени: | 2 s |
Ограничение по памяти: | 64 megabytes |
There are two circumferences on the plane. Your task is to find all points of their intersection.
Input file
The first line of the input file contains number of test cases K (1 ≤ K ≤ 10000). Each test case consists of two lines: first contains the description of the first circle, and the second one of the second. The description of each circle is written in the form x, y, r (-1000 ≤ x, y ≤ 1000, 0<r ≤ 1000). All numbers are integer.
Output file
For each test case you are to output one of the following messages:
- There are no points!!!, if there are no intersection points
- There are only i of them...., if the circles have exactly i intersection points. In this case next i lines contain coordinates of the points x'j and y'j. Points are to be displayed in the lexicographical order (first with the smallest x, if x coordinates are equal, first with the smallest y). Numbers are to be displayed with fourteen digits after the decimal point.
- I can't count them - too many points :(, if there are infinitely many points of intersection.
All messages have to be displayed without quotes.
Separate output for different test cases with a single blank line.
Your answer will be considered correct if absolute or relative error is less than 10-13.
Examples:
circles.in | circles.out |
---|---|
1 0 0 2 4 0 2 | There are only 1 of them.... 2.00000000000000 0.00000000000000 |
Источник: Petrozavodsk Winter 2003. Our Special Contest on Geometry, Wednesday, February 05
Автор: Andrew Lopatin, Nick Durov
Обсудить Отправить решение