Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:就是过不了,怎么搞的,,不就是网上的那个公式嘛。。

Posted by Eli_love at 2010-04-01 20:07:29 on Problem 2208
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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator