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

I am solving this problem with recursion.

I divide square into 4 peaces and recurse on them, if they
are in circle. so on...

but I got Wrong Answer on 7 test.
can you send me sophisticated tests.

and tell me your algorith too.
simple formula...
like this:2R^2*arctg((L^2-2R^2)/(L*sqrt(4R^2-L^2)))+L*sqrt(4*R^2-L^2)
well, this is only for when they intersect, else there is pi*r^2 or L^2
Thanks I'll look at this formula
Dulat_TKTL INter [3] // Problem 1084. Goat in the Garden 6 Feb 2006 11:35
where did you get this formula. I wonna get THis Book
Macarie wrote 2 September 2004 03:15
simple formula...
like this:2R^2*arctg((L^2-2R^2)/(L*sqrt(4R^2-L^2)))+L*sqrt(4*R^2-L^2)
well, this is only for when they intersect, else there is pi*r^2 or L^2
Macarie Re: INter [2] // Problem 1084. Goat in the Garden 6 Feb 2006 21:21
I deducted that formula :)
Imagine that!
Dulat_TKTL Re: INter [1] // Problem 1084. Goat in the Garden 9 Feb 2006 18:46
You are very intelligent men
tarakan No subject // Problem 1084. Goat in the Garden 9 Feb 2006 19:04
It is not too hard to get this formula by drawing a circle inside a rectangle on paper and thinking about it little
I got wrong 7 test like you.
Now I got AC.
You must give value of pi equal 3.1415926535.

I think it will AC.