Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:就是过不了,怎么搞的,,不就是网上的那个公式嘛。。In Reply To:就是过不了,怎么搞的,,不就是网上的那个公式嘛。。 Posted by:cug_fish2008 at 2010-03-16 11:19:10 #include<iostream> #include<cmath> using namespace std; int main() { double a,b,c,d,e,f; double tr1,tr2,tr3,tr4,temp,ans; scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f); tr1=acos( (c*c+b*b-f*f) / (2.0*b*c) ); tr2=acos( (a*a+c*c-e*e) / (2.0*a*c) ); tr3=acos( (a*a+b*b-d*d) / (2.0*a*b) ); tr4=(tr1+tr2+tr3)/2.0; temp=sqrt( sin(tr4) * sin(tr4-tr1) * sin(tr4-tr2) * sin(tr4-tr3)); ans=a*b*c*temp/3.0; printf("%.4lf\n",ans); return 7; } 我的代码 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator