#include<bits/stdc++.h>
using namespace std;
int main()
{
int T,ox,oy,ax,ay,bx,by,c=1;
double oa,ab,angle;
// freopen("check.txt","r",stdin);
scanf("%d",&T);
while(T--)
{
scanf("%d %d %d %d %d %d", &ox, &oy, &ax, &ay, &bx, &by);
oa = sqrt((ox-ax)*(ox-ax) + (oy-ay)*(oy-ay));
ab = sqrt((bx-ax)*(bx-ax) + (by-ay)*(by-ay));
angle = acos(((2*oa*oa)-ab*ab)/(2*oa*oa));
printf("Case %d: %.10lf\n", c++, angle*oa);
}
return 0;
}
Thursday, July 30, 2015
1433 - Minimum Arc Distance
Subscribe to:
Post Comments (Atom)
Triathlon
Triathlon - CodeChef # include < bits/stdc++.h > using namespace std ; # define fi first # define se second # define mp ...
-
# include < bits/stdc++.h > using namespace std ; int main ( ) { int T , c = 1 ; double r1 , r2 , h , p ; // ...
-
# include < bits/stdc++.h > using namespace std ; int main ( ) { long long T , S , l , n , c = 1 ; // freopen(&qu...
-
# include < bits/stdc++.h > using namespace std ; int main ( ) { int T , n , p , q , c = 1 , i , w , t , arry [ 50 ] ; ...
No comments:
Post a Comment