11232 - Cylinder

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

Moderator: Board moderators

Postby Jan » Wed Sep 05, 2007 4:35 am

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
Jan
Guru
 
Posts: 1334
Joined: Wed Jun 22, 2005 10:58 pm
Location: Dhaka, Bangladesh

Postby Carunty » Wed Sep 05, 2007 2:08 pm

Thank you for Jan.

It is a logic error rather than precision error.
Carunty
New poster
 
Posts: 18
Joined: Sat Jul 08, 2006 2:40 am

Re: 11232 - Cylinder

Postby vahid sanei » Sat Jan 24, 2009 12:14 pm

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


Code: Select all
 
Accepted
Impossible says I`m possible
User avatar
vahid sanei
Learning poster
 
Posts: 84
Joined: Fri Jan 09, 2009 4:37 pm
Location: IRAN

Re: 11232 - Cylinder

Postby newkid » Sat Jun 04, 2011 11:06 am

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

Postby newkid » Mon Jun 06, 2011 4:25 am

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..
newkid
Learning poster
 
Posts: 73
Joined: Fri Dec 12, 2008 3:06 am

Previous

Return to Volume CXII

Who is online

Users browsing this forum: No registered users and 0 guests