只过了第一个点...
记录页面
代码
#include<cstdio>
#include<cmath>
using namespace std;
struct T{
int x, y;
}a[5];
double ans;
int main(){
for(int i=0; i<3; i++){
scanf("%d", &a[i].x);
scanf("%d", &a[i].y);
}
ans += sqrt(pow(a[2].x - a[1].x, 2) + pow(a[2].y - a[1].y, 2));
ans += sqrt(pow(a[3].x - a[2].x, 2) + pow(a[3].y - a[2].y, 2));
ans += sqrt(pow(a[3].x - a[1].x, 2) + pow(a[3].y - a[1].y, 2));
printf("%.2lf", ans);
return 0;
}