⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pku1254.cpp

📁 这是ACM 方面的资料 是PKU的 北京大学的出来的
💻 CPP
字号:
#include <math.h>
#include <stdio.h>

int main()
{
	double x1,x2,y1,y2,t1,t2,x3,y3;
	double PI=acos(-1);
	int n;
	scanf("%d",&n);
	
	while(n--)
	{
		scanf("%lf%lf%lf%lf%lf%lf",&x1,&y1,&t1,&x2,&y2,&t2);
		
    	t1=t1*PI/180;
    	t2=t2*PI/180;
		
		y3=(cos(t2)*(sin(t1)*y1-cos(t1)*x1)-cos(t1)*(sin(t2)*y2-cos(t2)*x2))/(sin(t1-t2));
    	x3=(sin(t2)*(sin(t1)*y1-cos(t1)*x1)-sin(t1)*(sin(t2)*y2-cos(t2)*x2))/(sin(t1-t2));

		
		printf("%.4lf %.4lf\n",x3,y3);	
	}
	
	return 0;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -