做输入三点坐标求三角形边长的题目,在dev上可以运行,在洛谷上面提交会爆,求解答


#include<iostream>
#include<math.h>
#include<iomanip>
using namespace std;
int ace(double a,double b,double c,double d){
    double e;
    e=sqrt((a-c)*(a-c)+(b-d)*(b-d)); 
    return e;
} 
int main()
{double a,b,c,d,e,f,g,h,i;
cin>>a>>b;>>c>>d>>e>>f;
g=ace(a,b,c,d);
h=ace(a,b,e,f);
i=ace(c,d,e,f);
g=g+h+i;
cout<<fixed<<setprecision(2)<<g;
return 0;
}

int ace();
函数返回类型错了,改为double ace();
还有cin那里怎么有个分号

函数返回值类型改为double啊