文章
16
粉丝
0
获赞
41
访问
1.4k
#include<bits/stdc++.h>
using namespace std;
int main(){
int m;
cin>>m;
while(m--){
double x1,y1,x2,y2,x3,y3;
cin>>x1>>y1>>x2>>y2>>x3>>y3;
double a,b,c;
a = sqrt(pow(x1-x2,2) + pow(y1-y2,2));
b = sqrt(pow(x1-x3,2) + pow(y1-y3,2));
c = sqrt(pow(x2-x3,2) + pow(y2-y3,2));
if(fabs(a*a+b*b-c*c) < 1e-6||fabs(a*a+c*c-b*b) < 1e-6|| fabs(b*b+c*c-a*a) < 1e-6){
cout<<"Yes"<<endl;
}else {
cout<<"No"<<endl;
 ...
登录后发布评论
暂无评论,来抢沙发