ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1084. Goat in the Garden

steel wrang. help meeeeeeee
Posted by I am david. Tabo. 23 May 2002 09:58
uses math;
const p=3.14; {   -> p = pi , it will more accurate}
var a,r:integer;
    s,angl,cosa:real;
begin
  readln (a,r);
  if (2*r<a) then
    s:=p*r*r
  else
    if (sqrt(2)*r>a) then
      s:=a*a
    else
      begin
        cosa:=a/(2*r);
        angl:=2*arctan(cosa);
        angl:=p/2-angl;
        s:=((a/2)*sqrt(r*r-(a*a)/4))+angl*r*r/2;
        s := s * 4;
      end;
   writeln (s:10:3);
end.
Oh my god...................Too many Errors.
Posted by ECUST Multistar 23 May 2002 16:50
Oh my friend.Even though I try my best.
I still get 10 WA before I got AC with your program  8::::(
What a hard work....:-)
First of all
I use p=3.1415926535897
.......A terrible number, isn't it?
Then
if (2*r<a)  ==> if (2*r<=a)
if (sqrt(2)*r>a) ==> if (sqrt(2)*a/2<r) then
angl:=2*arctan(cosa); ==> angl:=2*arccos(cosa);
writeln (s:10:3); ===>  writeln (s:0:3);
Good luck next time.
By the way .I send a E-mail to you .
Reply it Ok??????

thenk you but wan i see your letter i don't undestend bicause i have no your font.please write it by 'arial' font
Posted by I am david. Tabo. 23 May 2002 17:37
Ok I'll try it later...
Posted by ECUST Multistar 23 May 2002 18:04
>
......ZZZzzzzzzzz
Posted by ECUST Multistar 23 May 2002 18:07
> By the way my E-mail is fc_rainofstar_@163.com
Send a E-mail to me Ok?
I send you letter!!!
Posted by I am david. Tabo. 24 May 2002 10:43