3 条题解

  • 1
    @ 2025-3-22 15:51:48

    #include<bits/stdc++.h> using namespace std;

    int main(){ double x1,y1,x2,y2,x3,y3,p; double a,b,c,s; cin>>x1>>y1>>x2>>y2>>x3>>y3; a=sqrt((x2-x1)(x2-x1)+(y2-y1)(y2-y1)); b=sqrt((x2-x3)(x2-x3)+(y2-y3)(y2-y3)); c=sqrt((x3-x1)(x3-x1)+(y3-y1)(y3-y1)); p=(a+b+c)/2; s=sqrt(p*(p-a)(p-b)(p-c)); cout<<fixed<<setprecision(2)<<s; return 0; }

    • 0
      @ 2025-3-23 12:29:33
      #include <bits/stdc++.h> 
      using namespace std;
      
      int main(){
      double a,b,c,d,e,f,x,y,z,n,m; 
      cin>>a>>b>>c>>d>>e>>f;
      x=sqrt((a-c)*(a-c)+(b-d)*(b-d));
      y=sqrt((a-e)*(a-e)+(b-f)*(b-f));
      z=sqrt((e-c)*(e-c)+(f-d)*(f-d));
      n=(x+y+z)/2;
      m=sqrt(n*(n-x)*(n-y)*(n-z));
      cout<<fixed<<setprecision(2)<<m;
      return 0; }
      
      • 0
        @ 2025-3-23 12:01:02

        #include <bits/stdc++.h> using namespace std;

        int main(){ ** double a,b,c,d,e,f,x,y,z,n,m;** ** cin>>a>>b>>c>>d>>e>>f;** ** x=sqrt((a-c)*(a-c)+(b-d)*(b-d));** ** y=sqrt((a-e)*(a-e)+(b-f)*(b-f));** ** z=sqrt((e-c)*(e-c)+(f-d)*(f-d));** ** n=(x+y+z)/2;** ** m=sqrt(n*(n-x)*(n-y)*(n-z));** ** cout<<fixed<<setprecision(2)<<m;** ** return 0;** }

        • 1

        信息

        ID
        35
        时间
        1000ms
        内存
        128MiB
        难度
        5
        标签
        (无)
        递交数
        114
        已通过
        41
        上传者