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

用ABsinC/2求面积 ---->

Posted by Bluebird at 2005-07-21 21:02:19 on Problem 2500
In Reply To:主过程没有问题. Posted by:c0500448242 at 2005-07-21 20:57:01
double getarea(int a, int b, int c)
{ int t1, t2, t3;
  double s1, s2, s3;
	t1 = (c + n - a) % n;
	s1 = d * sin(t1 * alph) / 2;
	t2 = (b + n - a) % n;
	s2 = d * sin(t2 * alph) / 2;
	t3 = (c + n - b) % n;
	s3 = d * sin(t3 * alph) / 2;
	return s2 + s3 - s1;
}


调用的时候修改为

getarea(0, cc[p], cc[i]);
getarea(0, cc[p - 1], cc[i]);
getarea(cc[i], cc[q], 0);
getarea(cc[i], cc[q - 1], 0);

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