11232 - Cylinder

All about problems in Volume 112. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

Jan
Guru
Posts: 1334
Joined: Wed Jun 22, 2005 10:58 pm
Location: Dhaka, Bangladesh
Contact:

Post 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.
Ami ekhono shopno dekhi...
HomePage
Carunty
New poster
Posts: 18
Joined: Sat Jul 08, 2006 2:40 am

Post by Carunty »

Thank you for Jan.

It is a logic error rather than precision error.
vahid sanei
Learning poster
Posts: 84
Joined: Fri Jan 09, 2009 4:37 pm
Location: IRAN

Re: 11232 - Cylinder

Post by vahid sanei »

we have two state , w is CIRCUMFERENCE or x ( L - 2 * r ) be CIRCUMFERENCE

Code: Select all

 
Accepted 
Impossible says I`m possible
newkid
Learning poster
Posts: 73
Joined: Fri Dec 12, 2008 3:06 am

Re: 11232 - Cylinder

Post 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
Last edited by newkid on Mon Jun 06, 2011 4:25 am, edited 1 time in total.
hmm..
newkid
Learning poster
Posts: 73
Joined: Fri Dec 12, 2008 3:06 am

Re: 11232 - Cylinder

Post 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.
hmm..
Post Reply

Return to “Volume 112 (11200-11299)”