uva 11646(大水题-几何分类)

View Code
 1 #include<cstdlib>
 2 #include<iostream>
 3 #include<cstdio>
 4 #include<cmath>
 5 #include<cstring>
 6 #include<algorithm>
 7 #include<set>
 8 #include<map>
 9 #include<list>
10 #include<queue>
11 #include<vector>
12 #define ULL unsigned long long
13 #define LL long long
14 #define UI unsigned int
15 #define inf 0x7fffffff
16 #define eps 1e-7
17 #define N 100009
18 #define M 20009
19 using namespace std;
20 int T,n,m,k,t;
21 double a,b,r,ang,h;
22 int main()
23 {
24 #ifndef ONLINE_JUDGE
25     freopen("ex.in","r",stdin);
26 //    freopen("ex.out","w",stdout);
27 #endif
28     int ncase=0;
29     while (~scanf("%lf : %lf",&a,&b))
30 //    scanf("%d",&T);
31 //    while (T--)
32     {
33         r=sqrt(a*a+b*b);
34         ang=asin(b/r)*2;
35         h=ang*r/2.0;
36         printf("Case %d: %.10lf %.10lf\n",++ncase,200.0/(h+a)*a,200.0/(h+a)*b);
37 //     printf("%d",ans);
38     }
39     return 0;
40 }

 

posted @ 2013-04-26 21:07  baoff  阅读(118)  评论(0编辑  收藏  举报