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

我用的是向量差积算面积

Posted by windbells at 2005-07-21 22:27:07 on Problem 2500
In Reply To:用ABsinC/2求面积 ----> Posted by:Bluebird at 2005-07-21 21:02:19
> 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