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

FT,这个算的是什么?

Posted by js05 at 2005-06-05 11:05:31 on Problem 1191
In Reply To:最后我要改成这样子才过 Posted by:frkstyc at 2005-06-05 11:03:29
> 			int x, y, r, dx, dy, a, b, c;
> 			double k;
> 			scanf("%d %d %d", &x, &y, &r);
> 			dx = x - X;
> 			dy = y - Y;
> 			a = -dx * dy;
> 			b = dx * dx + dy * dy - r * r;
> 			c = dy * dy - r * r;
> 			k = (a - r * sqrt(b)) / c;
> 			rec[i].x = X + k * Y;
> 			rec[i].sign = 1;
> 			k = (a + r * sqrt(b)) / c;
> 			rec[i + N].x = X + k * Y;
> 			rec[i + N].sign = -1;

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