Information
- ID
- 127
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 4
- Tags
- # Submissions
- 155
- Accepted
- 71
- Uploaded By
若卡住 延长梯形两斜边构成一个大的等腰三角形采用相似三角形解题
#include<bits/stdc++.h>
using namespace std;
int main()
{
double r,a,b,h;
cin>>r>>a>>b>>h;
if(b>=2*r){
cout<<"Drop";
return 0;
}else{
cout<<"Stuck"<<endl;
double x=(h*b)/(a-b);
double n=sqrt(h*h+(a-b)*(a-b)/4);
double p=(r*n)/((a-b)/2)-x;
printf("%0.10lf",p);
}
}
By signing up a 追梦算法网 universal account, you can submit code and join discussions in all online judging services provided by us.