Ball Dropping
题意:
求?的具体长度
题解:
算一算就出来了
代码:
#include<bits/stdc++.h>
using namespace std;
int main(){double r,a,b,h;cin>>r>>a>>b>>h;if(2*r<=b&&2*r<=a){printf("Drop");}else {double x=b*h/(a-b);double L=sqrt(a*a/4+(h+x)*(h+x));double y=L*b/a;double tot1=sqrt(y*y-b*b/4);double ans=(2*y*r)/b-tot1;printf("Stuck\n");printf("%.6f\n",ans);}}