Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

简单的二分

Posted by xiaorong at 2011-03-30 21:33:52 on Problem 2507
l=0,r=min(x,y)-0.0001;
while(r-l>eps){
    ans=(l+r)/2.0;
    temp=c/sqrt(x*x-ans*ans)+c/sqrt(y*y-ans*ans);
    if(temp-1<-eps) l=ans+0.0001;
    else if(temp-1>eps) r=ans-0.0001;
    else break;
}

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator