题目传送门

#include <bits/stdc++.h>

using namespace std;

double dis(double x1, double y1, double x2, double y2) {
    return sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
}


int main() {
    double x1, y1, x2, y2, x3, y3;
    cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
    printf("%.2lf", dis(x1, y1, x2, y2) + dis(x1, y1, x3, y3) + dis(x3, y3, x2, y2));
    return 0;
}

相关文章:

  • 2022-12-23
  • 2021-12-31
  • 2021-07-21
  • 2022-12-23
  • 2021-08-31
  • 2021-05-08
猜你喜欢
  • 2021-08-25
  • 2021-11-07
  • 2022-12-23
  • 2021-12-14
  • 2021-05-27
  • 2022-12-23
  • 2021-10-16
相关资源
相似解决方案