我编译器炸了?
查看原帖
我编译器炸了?
368912
文浅_e7楼主2021/8/2 22:43

本地能过,但是提交就CE。。。

#include<bits/stdc++.h>
using namespace std;
#define pi 3.141
typedef long long ll;
#define N 100005

double x1,y1,x2,y2,x3,y3;
double s1,s2,s3;
double ans;

void init(){
	cin>>x1>>y1>>x2>>y2>>x3>>y3;
}

void work(){
	s1=sqrt(pow((x2-x1),2)+pow((y2-y1),2));
	s2=sqrt(pow((x3-x2),2)+pow((y3-y2),2));
	s3=sqrt(pow((x3-x1),2)+pow((y3-y1),2));
	ans=s1+s2+s3;
	cout<<fixed<<setprecision(2)<<ans;
}

int main(int argc, char const *argv[])
{
	init();
	work();
	return 0;
}

2021/8/2 22:43
加载中...