#include<iostream>
#include<cmath>
#include<cstdio>
using namespace std;
int main(){
int t;
double a,b,l,sl;
double s;
cin>>t;
while(t--){
cin>>l>>a>>b;
b=b<a?b:a;
sl=sqrt(l*l*2);
if(b<=sl){
s=b*b/4.0;
//cout<<"one"<<b<<" "<<sl<<endl;
}
else{
if(b/2.0<sl){
double h=sl-b/2.0;
//int h=sl-b/2.0;//错在把h类型写错了,然后调试n久没看到
//cout<<"h: "<<h<<endl;
s=l*l-h*h;
}
else{
// cout<<"three"<<endl;
s=l*l;
}
}
printf("%.4lf\n",s);
}
return 0;
}
HDU 3349-lazy gege
最新推荐文章于 2018-04-23 20:40:36 发布