欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

2010年西北工业大学机试第四题

程序员文章站 2022-05-15 14:08:48
...

2010年西北工业大学机试第四题2010年西北工业大学机试第四题

#include<iostream>
#include<cmath>
using namespace std;
typedef struct node{
	int x,y;
}Node;
int main(){
	
	Node a,b,c;
	cin>>a.x;cin>>a.y;
	cin>>b.x;cin>>b.y;
	cin>>c.x;cin>>c.y;
	int l1 = abs(a.x - b.x)*abs(a.x - b.x)+abs(a.y - b.y)*abs(a.y - b.y);
	int l2 = abs(a.x - c.x)*abs(a.x - c.x)+abs(a.y - c.y)*abs(a.y - c.y);
	int l3 = abs(b.x - c.x)*abs(b.x - c.x)+abs(b.y - c.y)*abs(b.y - c.y);
	if(l1 == l2+l3||l2 == l1+l3||l3 == l1+l2){
		cout<<"yes"<<endl;
	}else{
		cout<<"no"<<endl;
	}
	return 0;
}