Page 3 of 3

Posted: Wed Sep 05, 2007 4:35 am
by Jan
Try the cases.

Input:

Code: Select all

1 10
1 11
0 0
Output:

Code: Select all

0.785
0.850
Hope these help.

Posted: Wed Sep 05, 2007 2:08 pm
by Carunty
Thank you for Jan.

It is a logic error rather than precision error.

Re: 11232 - Cylinder

Posted: Sat Jan 24, 2009 12:14 pm
by vahid sanei
we have two state , w is CIRCUMFERENCE or x ( L - 2 * r ) be CIRCUMFERENCE

Code: Select all

 
Accepted 

Re: 11232 - Cylinder

Posted: Sat Jun 04, 2011 11:06 am
by newkid
My code passes all the input posted in this thread, yet it manages to get WA.
Any help is appreciated.

Code: Select all

Removed.. Got accepted

Re: 11232 - Cylinder

Posted: Mon Jun 06, 2011 4:25 am
by newkid
Got Acc..

I had success with lower eps value (instead of 1e-9 instead of 1e-6).

I think binary search is not at all needed as the max volume can be at the terminal values only. Haven't tried that out yet though.