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 tzkq at 2010-06-20 18:51:27 on Problem 1254
In Reply To:Jackreturn对该题的详细解题报告+ACCEPTED代码 Posted by:Jack_Return at 2010-04-25 22:39:59
double n,c=acos(0.)/90,x,y,s,x2,y2,s2,k;
int main(){
	for(scanf("%lf",&n);n--;){
		scanf("%lf%lf%lf%lf%lf%lf",&x,&y,&s,&x2,&y2,&s2);
		k=((y-y2)*sin(s2*c)-(x-x2)*cos(s2*c))/(sin(s*c)*cos(s2*c)-cos(s*c)*sin(s2*c));
		printf("%.4f %.4f\n",x+k*sin(s*c),y+k*cos(s*c));
	}
}

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