为什么每次都是80分
#include<bits/stdc++.h>
using namespace std;
double calc(double a, double b, double c, double d){
return sqrt(abs((c-a)*(c-a))+abs((d-b)*(d-b)));
}
int main(){
int x1, y1, x2, y2, x3, y3;
double length=0.0;
cin>>x1>>y1;
cin>>x2>>y2;
cin>>x3>>y3;
length+=calc(x1,y1,x2,y2);
length+=calc(x1,y1,x3,y3);
length+=calc(x2,y2,x3,y3);
cout<<fixed<<setprecision(2)<<length;
return 0;
}
加了abs也不行