CIRCLE_H - Three Circle Problem (HARD)
Given 3 distinct circles with positive integer radius R1, R2, and R3, and arranged like in the picture below:
Now, your task is to compute radius of small circle that can be created like yellow circle in the picture above. All circles in the picture above tangent each other.
Input
The first line in the input data, there is an integer T(0 < T ≤ 105) denoting number of test cases, than T lines follow.
For each lines, there are three integer R1, R2, and R3, (0 < {R1, R2, R3} < 1030) denoting radius of each circle like in the picture above.
Output
For each test case, output radius of small circle that can be made, like in the picture above. Truncate the output to 50 digit after decimal point.
Example
Input: 3 1 1 1 10 10 10 23 46 69 Output: 0.15470053837925152901829756100391491129520350254025 1.54700538379251529018297561003914911295203502540253 6.00000000000000000000000000000000000000000000000000
You can see my submission history and time record for this problem: here
hide comments
Francky:
2013-04-06 11:48:50
If you want to learn something new, I recommend Matters computational, and Modern Computer Arithmetic. These are my main sources. Please share other useful links if you know some.
|
|
(Tjandra Satria Gunawan)(曾毅昆):
2013-04-06 00:04:04
|
Added by: | Tjandra Satria Gunawan |
Date: | 2013-04-05 |
Time limit: | 10s |
Source limit: | 10000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 |
Resource: | Own Problem |