80分求助
查看原帖
80分求助
715774
Little_Andyyu楼主2022/10/16 21:21
#include<bits/stdc++.h>
using namespace std;
int main()
{
	int a,b,c,d,e,f;
	cin>>a>>b>>c>>d>>e>>f;
	double g,h,i;
	g=sqrt((a-c)*(a-c)+(b-d)*(b-d));
	h=sqrt((a-e)*(a-e)+(b-f)*(b-f));
	i=sqrt((e-c)*(e-c)+(f-d)*(f-d));
	double j=1.0/2*(g+h+i);
	double k=sqrt(j*(j-g)*(j-h)*(j-i));
	cout<<int(k);
	return 0;
}
2022/10/16 21:21
加载中...