mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
ddd34a4f1c
2000-2099
18 lines
450 B
C++
18 lines
450 B
C++
#include<stdio.h>
|
|
#include<math.h>
|
|
#define Pi 3.141592653
|
|
int main()
|
|
{
|
|
int t;
|
|
scanf("%d",&t);
|
|
while(t--)
|
|
{
|
|
double x1,y1,x2,y2;
|
|
scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2);
|
|
double ans=0;
|
|
ans=acos( ((x1*x1 + y1*y1 + x2*x2 + y2*y2- (x1-x2)*(x1-x2) - (y1-y2)*(y1-y2) )/(2* sqrt(x1*x1 + y1*y1) * sqrt(x2*x2 + y2*y2) )))*180/Pi;
|
|
printf("%.2lf\n",ans);
|
|
}
|
|
return 0;
|
|
}
|