Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- typedef long long ll;
- int main()
- {
- int t;
- cin>>t;
- for(int i=1;i<=t;i++)
- {
- double ox,oy,ax,ay,bx,by,O,A,B,ang;
- cin>>ox>>oy>>ax>>ay>>bx>>by;
- O=sqrt((bx-ax)*(bx-ax)+(by-ay)*(by-ay));
- A=sqrt((ox-bx)*(ox-bx)+(oy-by)*(oy-by));
- B=sqrt((ox-ax)*(ox-ax)+(oy-ay)*(oy-ay));
- ang=acos(((A*A)+(B*B)-(O*O)) / (2.0*A*B));
- ang*=A;
- cout<< "Case "<<i<< ": "<<setprecision(8)<<fixed<<ang<<endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement