these kind of problems just waste our time
why "t" is diameter ???
in image in the problem "t" is`nt diameter
so i have some other test cases
in the problem problem setter says "All these integers are less than 100" so
can you solve these test cases? :
I saw many people discussing about the case where only t is given.
Many of you supposed the radius of the two inner circles are equals in this case.
But in fact, the resulting area is invariant with the radius in this case.
To prove this is used the following idea.
Make a big circle of radius R.
The tangent of length t will divide the circle in two sides (not necessarily equals).
If we trace the perpendicular line to the tangent passing through the center of the circle we will
divide the tangent in the middle.
Tracing a line from the center of the circle to one of the intersecting points between the tangent and the circle perimeter
we make a triangle.
Two of the sides will be R and t/2 and the third we call x.
Thus, r1 = (R + x)/2 and r2 = (R - x)/2. (1)
If we suppose a angle theta will be formed between the sides of length R and x, using the trigonometric identities we have:
R = (t/2) / sin(theta) and x = (t/2) * cos(theta) / sin(theta) (2)
We also know from the problem description that the area we search is
From (2),
= pi * 1/2 * (t^2/4) * ( 1/sin^2(theta) - cos^2(theta)/sin^2(theta) )
= pi * t^2/8 * ( 1 - cos^2(theta ) ) / sin^2(theta)
= pi * t^2/8 (3)
Then the area we search is pi * t^2/8
A little observation from the equation (2): if sin(theta) is 0, then the result would be undetermined.
But sin(theta) is 0 only if t = 0 and in this case r1 = R and r2 = 0. Thus, the resulting area is 0, that is right according to (3).
Thus, the area is independent from r1 and r2 when we have only t.
vahid sanei wrote:these kind of problems just waste our time
why "t" is diameter ???
in image in the problem "t" is`nt diameter
so i have some other test cases
in the problem problem setter says "All these integers are less than 100" so
can you solve these test cases? :
* A circle's radius can not be defined negative.
* If radius is 0 then it is a dot.
* Chord of a circle can not be negative or dot.
So I must say, "All these integers are less than 100" is good because the setter declared those as Circles.
Thank you.