提交时间:2024-01-25 11:43:27
运行 ID: 128087
#include<bits/stdc++.h> #pragma GCC optimize(3) #define IOS ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); using namespace std; const int N=1e5+10; const int INF=0x3f3f3f3f; long double x,y,c; int main() { IOS; while(cin>>x>>y>>c) { long double l=0,mid; long double r=x>y?y:x; while(l <= r) { mid=(l+r)/2.0; double a=sqrt(x*x-mid*mid),b=sqrt(y*y-mid*mid); if(c * (a + b) >= a * b) { r=mid-1e-4; } else { l=mid+1e-4; } } cout<<fixed<<setprecision(3)<<l<<endl; } return 0; }