5 条题解

  • 0
    @ 2025-11-11 19:03:39
    #include <stdio.h>
    int main(){
        double x1,y1,x2,y2,x3,y3,s;
        while(1){
            scanf("%lf%lf%lf%lf%lf%lf",&x1,&y1,&x2,&y2,&x3,&y3);
            if(x1==0&&x2==0&&x3==0&&y1==0&&y2==0&&y3==0)break;
            s=0.5*(x1*(y2-y3)+x2*(y3-y1)+x3*(y1-y2));
            if(s<0)s=-s;
            printf("%.1f\n",s);
        }
    }
    

    信息

    ID
    146
    时间
    3000ms
    内存
    128MiB
    难度
    6
    标签
    (无)
    递交数
    970
    已通过
    318
    上传者