Page 1 of 3
10573 - Geometry Paradox
Posted: Sun Oct 12, 2003 12:43 pm
by Farid Ahmadov
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.
herez the trick ( is it really good enough to be a trick? )
Posted: Sun Oct 12, 2003 1:52 pm
by Dreamer#1
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 error-free 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
Posted: Sun Oct 12, 2003 3:35 pm
by Farid Ahmadov
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.
i agree with you
Posted: Sun Oct 12, 2003 4:33 pm
by Dreamer#1
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#!
Posted: Sun Oct 12, 2003 4:34 pm
by mbakht
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 = (r1-r2)^2 + (t/2)^2
=> 4*r1*r2 = (t/2)^2
Hope it helps.
Posted: Sun Oct 12, 2003 5:18 pm
by subbu
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.
Posted: Sun Oct 12, 2003 6:20 pm
by Farid Ahmadov
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".
Posted: Sun Oct 12, 2003 7:09 pm
by Adrian Kuegel
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 r1-r2 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:
(pi*t*t)/4 - (pi*t*t)/8 = (pi*t*t)/4
it should be evaluated as pi*t*t/8.
Posted: Sun Oct 12, 2003 9:30 pm
by Farid Ahmadov
r1^2+2*r1*r2+r2^2=r1^2-2*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.
Posted: Thu Oct 16, 2003 11:38 am
by szymcio2001
Farid Ahmadov wrote:
This problem took me nearly 2 or 3 hours and I tried everything
I have also spent many time on this problem, but my problem was that I was calculating formula:
t = r / 2;
area = pi * t * t / 2;
When I changed to:
t = r;
area = pi * t * t / 8;
It got accepted.
Posted: Thu Oct 16, 2003 1:20 pm
by Andrey Mokhov
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.
Posted: Thu Oct 16, 2003 6:21 pm
by Maarten
i agree completely; i got accepted on my first submission as well, it's a very beautiful geometry problem. Actually I was very surprised to find out that the gray area can be calculated from t only
Posted: Thu Oct 16, 2003 8:16 pm
by gvcormac
szymcio2001 wrote:Farid Ahmadov wrote:
This problem took me nearly 2 or 3 hours and I tried everything
I have also spent many time on this problem, but my problem was that I was calculating formula:
t = r / 2;
area = pi * t * t / 2;
When I changed to:
t = r;
area = pi * t * t / 8;
It got accepted.
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).
Posted: Thu Oct 16, 2003 9:23 pm
by szymcio2001
gvcormac wrote:
Is it possible that t was declared to be an integer?
No. Before and after change it was a double.
Judge Data
Posted: Fri Oct 17, 2003 1:12 am
by shahriar_manzoor
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.