## 10289 - A Square and Equilateral Triangles

Moderator: Board moderators

Dominik Michniewski
Guru
Posts: 834
Joined: Wed May 29, 2002 4:11 pm
Location: Wroclaw, Poland
Contact:

### 10289 - A Square and Equilateral Triangles

How can I solve case nr 5 ?

Best regards
Dominik

wyvmak
Experienced poster
Posts: 110
Joined: Thu Dec 13, 2001 2:00 am
treat it the same as 8, the upper left triangle can be rotated to be as if it is a mirrored reflection from the bottom part.

Dominik Michniewski
Guru
Posts: 834
Joined: Wed May 29, 2002 4:11 pm
Location: Wroclaw, Poland
Contact:
Thanks wyvmak!
Maybe I solve it now ...
BTW I think, that isn't the same as 8 ... I thought , that the most upper triangle don't touch the one in middle ...

Dominik Michniewski
Guru
Posts: 834
Joined: Wed May 29, 2002 4:11 pm
Location: Wroclaw, Poland
Contact:
I finally got accepted
Thanks wyvmak again

lu shukai
New poster
Posts: 7
Joined: Tue Aug 06, 2002 9:26 am

### 10289 help

program P10289;
{\$APPTYPE CONSOLE}
uses
SysUtils;

var
n,pi,a,b,c,d,e,f,g:real;
aa,bb,cc:real;
begin
pi:=4*arctan(1);
while not eof do begin
a:=n/sin(75/180*pi);
b:=n/sin(120/180*pi)*sin(45/180*pi);
c:=n*sqrt(2)/sqrt(3)*2/(1+sqrt(2));
d:=n*sqrt(3)/(1+sqrt(3));
aa:=(1-0.75-3-3*sqrt(3)/2);
bb:=sqrt(3)/2+(3+sqrt(3))*(sqrt(3)/2+1);
cc:=-0.25-1-0.75-sqrt(3);
e:=(-bb+sqrt(sqr(bb)-4*aa*cc))/2/aa;
f:=n*(sqrt(3)+3)/9;
g:=n*(sqrt(3)+1)/(4+sqrt(3));
writeln(a:0:10,' ',b:0:10,' ',c:0:10,' ',d:0:10,' ',e*n:0:10,' ',f:0:10,' ',g:0:10);
end;
end.

Dominik Michniewski
Guru
Posts: 834
Joined: Wed May 29, 2002 4:11 pm
Location: Wroclaw, Poland
Contact:
Do must have a mistake in formulas ....
I'll check in which one - I don't find my code now - and write you ASAP

Dominik

lu shukai
New poster
Posts: 7
Joined: Tue Aug 06, 2002 9:26 am

### i got ac

i have found my problem.
the fifth graph is not balanced.
thank you!

cooleye
New poster
Posts: 4
Joined: Sun Oct 13, 2002 5:14 pm
Location: Hong Kong

### 10289 again

it seems that the judge have got wrong with the case of 5 triangle

0.55437056466848326729919722838716
(2 + sqrt(3)) / (5 + sqrt(3))

but I got

0.554579157314857

scottaugust
New poster
Posts: 18
Joined: Thu Jun 20, 2002 4:54 pm
Cooleye,

Check your geometry again, (2 + sqrt(3))/(5 + sqrt(3)) is correct.

Scott

cooleye
New poster
Posts: 4
Joined: Sun Oct 13, 2002 5:14 pm
Location: Hong Kong
it's wrong to assume that the top triangle and the bottom one is
on the same axis.

'You can assume that when the images look exactly symmetric along a certain axis they are actually symmetric along that certain axis.'

This does not apply to case 5 as there is no axis of symmetry.

Mahbub
New poster
Posts: 26
Joined: Thu Aug 08, 2002 8:04 am
Well..the left top triangle shouldn't be considered ..u can find the answer only by looking at the 3 right and one bottom left trinagles..
and the answer for the judge is indeed correct.

Thanks

cooleye
New poster
Posts: 4
Joined: Sun Oct 13, 2002 5:14 pm
Location: Hong Kong
Mahbub wrote:Well..the left top triangle shouldn't be considered
I think that triangle is very important, if you check the coordinate of the points, you will find the problem

Mahbub
New poster
Posts: 26
Joined: Thu Aug 08, 2002 8:04 am
I cant understand wat u mean..but i got accpeted without taking into account that triangle...after that wat can u think?

cooleye
New poster
Posts: 4
Joined: Sun Oct 13, 2002 5:14 pm
Location: Hong Kong

If you check the length of XY,
you will find that it's a little bit larger than the answer.

It implies that there will be some unused space
and you can pack lager triangle.

So I think the offical answer is wrong.

scottaugust
New poster
Posts: 18
Joined: Thu Jun 20, 2002 4:54 pm
It took me awhile to get back to this problem and try out what cooleye is referring to. I now agree that the judge is wrong. There are three different ways to look at this problem (one of them is not consistent with the drawing).

1) B & D are opposite each other - A is floating. The answer that the judge is looking for 0.554370564668483.

2) Both A & E are rotated towards each other - this is not consistent with the drawing. Answer is 0.554475730504727.

3) E is next to D, A is rotated to touch E, B is slid to the left to touch A (this will have the effect of moving C up). This is the answer that cooleye thinks should be the correct answer - I agree. However I came up with 0.554585564881060 verses cooleye's 0.554579157314857. I am not sure where the difference come from, I was not able to produce cooleye's answer - probably some mistake on my part.

Scott