G - Preparing for Exams-

  • G - Preparing for Exams

  •  Gym - 101778G 
  • 小知识点:
  • 圆内接四边形对角互补即=180
  • 易证△oab∽△obc 所以可求边之比
  • #include<stdio.h>
    #include<algorithm>
    #include<cstring>
    #include<cmath>
    #include<vector>
    #include<map>
    #include<iostream>
    #define maxn 1555555
    using namespace std;
    int t;
    double a,b,c,d,e,f,x;
    int main()
    {
        scanf("%d",&t);
        while(t--)
        {
            scanf("%lf%lf%lf%lf",&a,&b,&c,&d);
            x=sqrt(d/c);
            e=a*x;
            f=b*x;
            c=e-b;
            d=f-a;
            printf("%lf %lf\n",c,d);
        }
        return 0;
    }
    
  •  

猜你喜欢

转载自blog.csdn.net/BePosit/article/details/82424414
今日推荐