2 条题解

  • 0
    @ 2024-12-6 13:35:10
    #include<bits/stdc++.h>
    using namespace std;
    double jl(double x1,double y1,double x2,double y2)
    {
    	return sqrt(pow((x1-x2),2)+pow((y1-y2),2));
    }
    int main()
    {
    	int x[10],y[10];
        for(int i=1;i<4;i++)
            cin>>x[i]>>y[i];
    	double a,b,c;
    	a=jl(x[1],y[1],x[2],y[2]);
    	b=jl(x[1],y[1],x[3],y[3]);
    	c=jl(x[2],y[2],x[3],y[3]);
    	cout<<fixed<<setprecision(2)<<a+b+c;
    	return 0;
    }
    
    • 0
      @ 2024-12-5 13:57:06

      include<bits/stdc++.h> using namespace std; int jv(double a,double b,double c,double d) {

      if(abs(a)<100||abs(a)==100&&abs(b)<100||abs(b)==100&&abs(c)<100||abs(c)==100&&abs(d)<100||abs(d)==100)
      {
         
      	return  sqrt(((a-c)*(a-c)*1.00+(b-d)*(b-d)*1.00)/0.1/10);
      }
      

      } int main() { double a,b,c,d,e,f,zhou; cin>>a>>b>>c>>d>>e>>f; zhou=(jv(a,b,c,d)+jv(a,b,e,f)+jv(c,d,e,f))*1.00; cout<<fixed<<setprecision(2)<<zhou; }

      • 1

      信息

      ID
      213
      时间
      1000ms
      内存
      256MiB
      难度
      7
      标签
      递交数
      19
      已通过
      8
      上传者