Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
最后我要改成这样子才过In Reply To:果然...~~~~晕啊!!!!! Posted by:ArXoR at 2005-06-05 11:02:02 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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator