| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
求大神解释...T_T(为什么都没有P的...)program p2507;
var
x,y,c,l,r,mid,f,h1,h2:double;
function min(i,j:real):double;
begin
if i<j then
exit(i);
exit(j);
end;
begin
while not(eof) do
begin
readln(x,y,c);
l:=0;
r:=min(x,y);
while r-l>0.000001 do
begin
mid:=(l+r)/2;
h1:=sqrt(abs(x*x-mid*mid));
h2:=sqrt(abs(y*y-mid*mid));
f:=h1*h2/(h1+h2);
if f>c then
l:=mid+0.000001
else
r:=mid-0.000001;
end;
writeln(l:0:3);
end;
end.
我都精确到这么多了...交了一晚上都没过啊...T_T
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator