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 zhangk at 2015-07-18 22:45:18 on Problem 2208
In Reply To:就是过不了,怎么搞的,,不就是网上的那个公式嘛。。 Posted by:cug_fish2008 at 2010-03-16 11:19:10
> int main()
> {
> 	int a,b,c,m,n,l;
> 	scanf("%d %d %d %d %d %d",&a,&b,&c,&m,&n,&l);//abc可交换,mnl可交换
> 	double v =sqrt(double(4*a*a*b*b*c*c-a*a*(b*b+c*c-m*m)*(b*b+c*c-m*m)-b*b*(c*c+a*a-n*n)*(c*c+a*a-n*n)-c*c*(a*a+b*b-l*l)*(a*a+b*b-l*l)+(a*a+b*b-l*l)*(b*b+c*c-m*m)*(c*c+a*a-n*n)))/12;
> 	printf("%.4f",v);
> 	return 0;
> }
> 
> 大牛在那里?
把int改成long long,还有m和l的位置调换一下,就过了。虽说是轮换,但是你观察一下公式,a和m是对应的,也即侧棱和底三角形的对边对应。

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