| ||||||||||
| 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: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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator