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
[Lakshman]:
2016-06-28 08:45:46
This problem can be done with PY3.4 using library Functions. |
|
knb_dtu:
2014-05-23 22:12:17
@Tjandra:Could you please check why my submission timed out?
|
|
Sandeep Pathry:
2013-07-09 15:35:31
@Tjandra... please see my solution in python...
|
|
(Tjandra Satria Gunawan)(曾毅昆):
2013-06-01 14:34:41
@raunak_talwar: My computer is running windows, not linux.. But I'll try it, when I have linux again..
|
|
Francky:
2013-04-12 11:53:51
@raunak_talwar: You can use Python or PIKE they have fast bigNum library included. In C/C++, you have to build entirely it by yourself ; it's a good exercise.
|
|
raunakrocks:
2013-04-12 10:26:20
@Tjandra:sir,you have to insall libgmp3-dev gmp library to run this code... |
|
raunakrocks:
2013-04-12 10:19:29
@Francky :yes,sir i'm trying to solve this using gmp_f in c/c++..but not getting the right way...any help to solve?? |
|
Francky:
2013-04-11 20:55:52
@raunak_talwar : for a guy who solved 178 problems in few times, often at first shot, you have a curious question, isn't it ? |
|
raunakrocks:
2013-04-11 20:21:41
is gmf_t not allowed on spoj?
|
|
Francky:
2013-04-06 21:25:21
Medium edition in tutorial will be helpful. |
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 |