zoj 3488 Conic Section

注意分类方法,输入的数据都是特殊的那些情况,不用考虑太复杂……

#include<stdio.h>
int main()
{
    int cas;
    double a,b,c,d,e,f;
    scanf("%d",&cas);
    while(cas--)
    {
        scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f);
        if(a==c) printf("circle
");
        else if(a==0||c==0) printf("parabola
");
        else
        {
            if(a*c<0)  printf("hyperbola
");
            else printf("ellipse
");
        }
    }
    return 0;
}

版权声明:本文为博主原创文章,未经博主允许不得转载。http://xiang578.top/

原文地址:https://www.cnblogs.com/xryz/p/4848102.html