标签:ret sort include style euc class bnu cli main
结论。
算了好久不会算,最后看了样例猜出了结论。次长边全用上,再用最长边减去次长边。
#include<bits/stdc++.h> using namespace std; int T; double a[5]; double pi = acos(-1.0); bool cmp(double x,double y) { return x>y; } int main() { scanf("%d",&T); while(T--) { scanf("%lf",&a[0]); scanf("%lf",&a[1]); scanf("%lf",&a[2]); sort(a,a+3); double r1 = 0; double r2 = a[1]; double r3 = a[2] - a[1]; double ans = pi * (r1*r1+r2*r2+r3*r3); printf("%.10f\n",ans); } return 0; }
BNUOJ 52505 Euclidean Geometry
标签:ret sort include style euc class bnu cli main
原文地址:http://www.cnblogs.com/zufezzt/p/6804416.html