Page 3 of 3
Posted: Wed Sep 05, 2007 4:35 am
by Jan
Try the cases.
Input:
Output:
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
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.
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.