3 条题解

  • 0
    @ 2026-8-18 15:34:56

    #include<bits/stdc++.h> using namespace std; int main(){ double x1,y1,x2,y2,x3,y3; cin>>x1>>y1>>x2>>y2>>x3>>y3; double ans =sqrt((x1-x2)(x1-x2)+(y1-y2)(y1-y2))+sqrt((x2-x3)(x2-x3)+(y2-y3)(y2-y3))+sqrt((x1-x3)(x1-x3)+(y1-y3)(y1-y3)); cout<<fixed<<setprecision(2)<<ans<<endl; return 0; }

    • 0
      @ 2026-7-4 11:33:29
      using namespace std;
      int main(){
          double x1,y1,x2,y2,x3,y3;
          cin>>x1>>y1>>x2>>y2>>x3>>y3;
          double ans =sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2))+sqrt((x2-x3)*(x2-x3)+(y2-y3)*(y2-y3))+sqrt((x1-x3)*(x1-x3)+(y1-y3)*(y1-y3));
          cout<<fixed<<setprecision(2)<<ans<<endl;
          return 0;
      }
      
      
      
      • 0
        @ 2026-7-4 11:24:42

        (O.o)/

        • 1

        信息

        ID
        3
        时间
        1000ms
        内存
        256MiB
        难度
        5
        标签
        (无)
        递交数
        156
        已通过
        58
        上传者