标签:
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 2087 Accepted Submission(s): 693
#include <iostream> #include <cstdio> #include <string.h> #include <math.h> #include <algorithm> double Cos(double a,double b,double c) { return (a*a+b*b-c*c)/(2.0*a*b); } int main() { double a,b,c,d,e,f; while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f)!=EOF){ double horna = Cos(c,e,a); double hornb = Cos(e,f,d); double hornc = Cos(f,c,b); double v = c*e*f*sqrt(1+2*horna*hornb*hornc-horna*horna-hornb*hornb-hornc*hornc)/6; printf("%.4lf\n",v); } return 0; }
标签:
原文地址:http://www.cnblogs.com/liyinggang/p/5440027.html