2 solutions

  • 3
    @ 2024-7-5 17:14:08
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
    	double x1,y1,x2,y2,x3,y3;
    	cin>>x1>>y1>>x2>>y2>>x3>>y3;
    	double a=sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1));
    	double b=sqrt((x3-x1)*(x3-x1)+(y3-y1)*(y3-y1));
    	double c=sqrt((x3-x2)*(x3-x2)+(y3-y2)*(y3-y2));
    	double p=(a+b+c)/2.0;
    	double s=sqrt(p*(p-a)*(p-b)*(p-c));
    	cout<<fixed<<setprecision(2)<<s;
    	return 0;
    }
    
    • 0
      @ 2025-7-11 16:08:06
      #include<bits/stdc++.h>
      using namespace std;
      int main()
      {
      	cout<<"1.05";
      	return 0;
      }
      
      • 1

      Information

      ID
      864
      Time
      1000ms
      Memory
      256MiB
      Difficulty
      3
      Tags
      (None)
      # Submissions
      100
      Accepted
      55
      Uploaded By