10573  Geometry Paradox
Moderator: Board moderators

 Experienced poster
 Posts: 131
 Joined: Thu Apr 17, 2003 8:39 am
 Location: Baku, Azerbaijan
10573  Geometry Paradox
Hi. I could not solve it at contest. I always got WA. There were 236 AC. I don't know what was wrong. I tried nearly everything. I submitted it 20 times. Algo is simple: If there are two numbers the the gray area is 2*Pi*r1*r2, if there is one number t then it is not possible to find gray are and I write "Impossible."
[pascal]program Geometry_Paradox;
var
n,i,k: Integer;
r: array[1..2] of Integer;
begin
readln(n);
for i:=1 to n do
begin
k:=0;
while not eoln do
begin
inc(k);
read(r[k]);
end;
if k=2 then
begin
writeln(2*pi*r[1]*r[2]:0:4);
end else
begin
writeln('Impossible.');
end;
readln;
end;
end.[/pascal]
What is wrong with it?
thnx.
[pascal]program Geometry_Paradox;
var
n,i,k: Integer;
r: array[1..2] of Integer;
begin
readln(n);
for i:=1 to n do
begin
k:=0;
while not eoln do
begin
inc(k);
read(r[k]);
end;
if k=2 then
begin
writeln(2*pi*r[1]*r[2]:0:4);
end else
begin
writeln('Impossible.');
end;
readln;
end;
end.[/pascal]
What is wrong with it?
thnx.
_____________
NO sigNature
NO sigNature
herez the trick ( is it really good enough to be a trick? )
if only the value of t is given why can we not calculate the gray area?
since in this case r1 & r2 can be any value so for ease we can consider r1=r2 then t becomes the diameter of the outer(larger) circle.. thus area of the outer circle becomes pi*(t/2)*(t/2)... hence total area of the smaller circles become pi*(t/4)*(t/4) + pi*(t/4)*(t/4)
thus area of the gray part = (pi*t*t)/4  (pi*t*t)/8 = (pi*t*t)/8 (thnx Adrian)
when you see lots of ppl solve a problem in no time consider it very simple & think in the simplest possible way...
hope it helps...
this contest was a mess for me cause i didn't visit the clarification board & so i couldn't AC the problems D & H, which i'm sure i'd solved properly... i would request the arrangers to set errorfree problems from next time onwards... though i guess i should've taken the trouble of visiting the clarification board during the contest... but unfortunately i didn't...
Dreamer#1
since in this case r1 & r2 can be any value so for ease we can consider r1=r2 then t becomes the diameter of the outer(larger) circle.. thus area of the outer circle becomes pi*(t/2)*(t/2)... hence total area of the smaller circles become pi*(t/4)*(t/4) + pi*(t/4)*(t/4)
thus area of the gray part = (pi*t*t)/4  (pi*t*t)/8 = (pi*t*t)/8 (thnx Adrian)
when you see lots of ppl solve a problem in no time consider it very simple & think in the simplest possible way...
hope it helps...
this contest was a mess for me cause i didn't visit the clarification board & so i couldn't AC the problems D & H, which i'm sure i'd solved properly... i would request the arrangers to set errorfree problems from next time onwards... though i guess i should've taken the trouble of visiting the clarification board during the contest... but unfortunately i didn't...
Dreamer#1
Last edited by Dreamer#1 on Mon Oct 13, 2003 12:39 am, edited 1 time in total.
Not all of our dreams can be made to come true. But still we live with the hope to turn them into reality someday.

 Experienced poster
 Posts: 131
 Joined: Thu Apr 17, 2003 8:39 am
 Location: Baku, Azerbaijan
Thank you very much. But there was nothing said about it in problem statement. If given only t then r1 and r2 can get any value. So I am not sure about that, and I don't agree with that. If we cannot say anything about the gray area, it means "Impossible.". You can say it only if there is something about minimal gray area. I must raise my objections about judge's "correct" answers if they take pi*t*t/4 as a correct answer for t.
Thank you for your attention.
Thank you for your attention.
_____________
NO sigNature
NO sigNature
i agree with you
yes, I completely agree with you... thats the reason i'm not ready to consider it to be something that can really be considered as a trick rather its very unclear & confusing...
can you check something, is the value of gray region always constant for any value of t? i mean does the value of area of gray region change if i use two inners circles of different radius rather than calculating it considering that the two inner circlers are of same radius as we did to solve this problem... if the value is not constant then obviously the problem has its share of flaws...
thanks
Dreamer#!
can you check something, is the value of gray region always constant for any value of t? i mean does the value of area of gray region change if i use two inners circles of different radius rather than calculating it considering that the two inner circlers are of same radius as we did to solve this problem... if the value is not constant then obviously the problem has its share of flaws...
thanks
Dreamer#!
Not all of our dreams can be made to come true. But still we live with the hope to turn them into reality someday.
Hi,
When only t is given, there is no need to assume that r1 = r2. You can still get the area of gray area for any values of r1 and r2, provided you know t.
Let us consider the right angle triangle that half of the chord t forms with the center of the largest circle. For that right angle triangle,
(r1+r2)^2 = (r1r2)^2 + (t/2)^2
=> 4*r1*r2 = (t/2)^2
Hope it helps.
When only t is given, there is no need to assume that r1 = r2. You can still get the area of gray area for any values of r1 and r2, provided you know t.
Let us consider the right angle triangle that half of the chord t forms with the center of the largest circle. For that right angle triangle,
(r1+r2)^2 = (r1r2)^2 + (t/2)^2
=> 4*r1*r2 = (t/2)^2
Hope it helps.
Stupid me..
I missed the statement that the three centers are collinear.
As it is ,the problem is perfectly alright and I look forward to more such
geometrical problems.
I missed the statement that the three centers are collinear.
As it is ,the problem is perfectly alright and I look forward to more such
geometrical problems.
Last edited by subbu on Thu Oct 16, 2003 5:05 pm, edited 1 time in total.

 Experienced poster
 Posts: 131
 Joined: Thu Apr 17, 2003 8:39 am
 Location: Baku, Azerbaijan
I cannot agree with people who agree with problemsetter of this problem or judge who thinks that he is correct.
Picture 1:
Picture 2:
You see this two pictures. t is same in both of this pictures. And there are infinite circles that can be drawn with only given t. Is there something said about circles when only t is given? No.
And that is why I do consider this problem as a real confusing and not clear "problem".
Picture 1:
Picture 2:
You see this two pictures. t is same in both of this pictures. And there are infinite circles that can be drawn with only given t. Is there something said about circles when only t is given? No.
And that is why I do consider this problem as a real confusing and not clear "problem".
Last edited by Farid Ahmadov on Sun Oct 12, 2003 8:48 pm, edited 1 time in total.
_____________
NO sigNature
NO sigNature

 Guru
 Posts: 724
 Joined: Wed Dec 19, 2001 2:00 am
 Location: Germany
To Farid: The circles that you have drawn are no good example. If I see it right, then the radius for bigger circle is here the sum of the radii of the two smaller circle. But here the formula of mbakht applies:
The right triangle has the side c as r1+r2 = radius of big circle, side a r1r2 and side b t/2. Just use pythagoras, and you get what mbakht wrote.
The answer that was wanted was 2*r1*r2*PI, so divide the right side of the equation and you have t*t/8*PI.
To dreamer: You made a small typing error, to avoid confusions with what is the correct answer if t is given I mention it:
The right triangle has the side c as r1+r2 = radius of big circle, side a r1r2 and side b t/2. Just use pythagoras, and you get what mbakht wrote.
The answer that was wanted was 2*r1*r2*PI, so divide the right side of the equation and you have t*t/8*PI.
To dreamer: You made a small typing error, to avoid confusions with what is the correct answer if t is given I mention it:
it should be evaluated as pi*t*t/8.(pi*t*t)/4  (pi*t*t)/8 = (pi*t*t)/4
Last edited by Adrian Kuegel on Sat Oct 25, 2003 2:25 pm, edited 1 time in total.

 Experienced poster
 Posts: 131
 Joined: Thu Apr 17, 2003 8:39 am
 Location: Baku, Azerbaijan
r1^2+2*r1*r2+r2^2=r1^22*r1*r2+r2^2+t^2/4
2*r1*r2=t^2/8
2*pi*r1*r2=pi*t*t/8 = gray area
This problem took me nearly 2 or 3 hours and I tried everything, even if t will be diameter of the largest circle and got same formula. But I could not get accepted. Of course problems were in my programs. And this made me think that problemsetter was not correct. But my mind still is not changed. And I still consider that problems of such a non contest type must not take place in this contests. 236 AC and I know that nearly 50 % of them got accepted, because they found formula. And there were people like me who were not lucky. The statement of a problem must be complete, clear and with no distraction from main logic. Sorry for my anger, but I don't like (hate) most of this problems. Of course there are good composed and with a good logic problems among them. I don't like them because there is even no trick in them and this problems are just confusing.
That is all. Sorry for that I was wrong about judge's answer correctness, but I still disagree with statement and hope that in future problemsetters will be more responsible to problem statement.
Thank you.
2*r1*r2=t^2/8
2*pi*r1*r2=pi*t*t/8 = gray area
This problem took me nearly 2 or 3 hours and I tried everything, even if t will be diameter of the largest circle and got same formula. But I could not get accepted. Of course problems were in my programs. And this made me think that problemsetter was not correct. But my mind still is not changed. And I still consider that problems of such a non contest type must not take place in this contests. 236 AC and I know that nearly 50 % of them got accepted, because they found formula. And there were people like me who were not lucky. The statement of a problem must be complete, clear and with no distraction from main logic. Sorry for my anger, but I don't like (hate) most of this problems. Of course there are good composed and with a good logic problems among them. I don't like them because there is even no trick in them and this problems are just confusing.
That is all. Sorry for that I was wrong about judge's answer correctness, but I still disagree with statement and hope that in future problemsetters will be more responsible to problem statement.
Thank you.
_____________
NO sigNature
NO sigNature
 szymcio2001
 New poster
 Posts: 38
 Joined: Mon Dec 09, 2002 1:53 pm
 Location: Poznan, Poland

 Experienced poster
 Posts: 128
 Joined: Fri Nov 15, 2002 7:45 am
 Location: Kyrgyzstan
Hello, everyone.
I think the problem is absolutely correct and moreover I want thank Shahriar Manzoor for such a beautiful problem . And I think that the problem statement says right enough to solve it within a contest. I got AC on it from my first submission (pity that not in the contest  it was too late in my country ). The first thought was to let t=2*R. I used the following speculations:
 The problemsetter says that the problem can be solved using only t. (In fact he doesn't say so  but I think it's too naive to think that the problem is just to print Impossible where only t is given ).
 If so then relation between r1 and r2 doesn't affect the target area.
 Finally let's think that r1/r2=1 i.e. t=2*R. That's it!
Please don't think of this as of some boasting chatter.
I just want to prove that the problemsetter was correct.
Best regards,
Andrey Mokhov.
I think the problem is absolutely correct and moreover I want thank Shahriar Manzoor for such a beautiful problem . And I think that the problem statement says right enough to solve it within a contest. I got AC on it from my first submission (pity that not in the contest  it was too late in my country ). The first thought was to let t=2*R. I used the following speculations:
 The problemsetter says that the problem can be solved using only t. (In fact he doesn't say so  but I think it's too naive to think that the problem is just to print Impossible where only t is given ).
 If so then relation between r1 and r2 doesn't affect the target area.
 Finally let's think that r1/r2=1 i.e. t=2*R. That's it!
Please don't think of this as of some boasting chatter.
I just want to prove that the problemsetter was correct.
Best regards,
Andrey Mokhov.
Is it possible that t was declared to be an integer? I've heard other complaints about precision on this problem. Indeed the numbers could've been nasty, but they weren't (at least not in the judging data I saw).szymcio2001 wrote:I have also spent many time on this problem, but my problem was that I was calculating formula:Farid Ahmadov wrote: This problem took me nearly 2 or 3 hours and I tried everything
t = r / 2;
area = pi * t * t / 2;
When I changed to:
t = r;
area = pi * t * t / 8;
It got accepted.
 szymcio2001
 New poster
 Posts: 38
 Joined: Mon Dec 09, 2002 1:53 pm
 Location: Poznan, Poland

 System administrator & Problemsetter
 Posts: 399
 Joined: Sat Jan 12, 2002 2:00 am
Judge Data
The judge data is the same as what prof. Cormack saw. In early days I tried some bad tricks on problems, now I try to avoid those tricks . This problem was used in our local contest and I found no case of precision errors. The problem statement has been changed a little after the contest to make it correct.