10289 - A Square and Equilateral Triangles
Moderator: Board moderators
-
- 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
Best regards
Dominik
-
- Guru
- Posts: 834
- Joined: Wed May 29, 2002 4:11 pm
- Location: Wroclaw, Poland
- Contact:
-
- Guru
- Posts: 834
- Joined: Wed May 29, 2002 4:11 pm
- Location: Wroclaw, Poland
- Contact:
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
readln(n);
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.
//why i got wa? please help me thank you
{$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
readln(n);
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.
//why i got wa? please help me thank you
-
- Guru
- Posts: 834
- Joined: Wed May 29, 2002 4:11 pm
- Location: Wroclaw, Poland
- Contact:
10289 again
it seems that the judge have got wrong with the case of 5 triangle
the offical answer is
0.55437056466848326729919722838716
(2 + sqrt(3)) / (5 + sqrt(3))
but I got
0.554579157314857
the offical answer is
0.55437056466848326729919722838716
(2 + sqrt(3)) / (5 + sqrt(3))
but I got
0.554579157314857
-
- New poster
- Posts: 18
- Joined: Thu Jun 20, 2002 4:54 pm
-
- 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
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