HDU 5054Alice and Bob

来源:互联网 发布:windws10固态硬盘优化 编辑:程序博客网 时间:2024/05/01 19:18

傻了,显然在xy必须在矩形中间才能相遇


#include<iostream>#include<cstdio>#include<set>#include<string>#include<string.h>#include<cstring>#include<vector>#include<map>#include<queue>#include<stack>#include<cctype>#include<algorithm>#include<sstream>#include<utility>#include<cmath>#include<functional>#define mt(a) memset(a,0,sizeof (a))#define fl(a,b,c) fill(a,b,c)#define SWAP(a,b,t) (t=a,a=b,b=t)#define inf 1000000000+7using namespace std;typedef long long ll;int main(){int x, y, a, b;while (cin >> x >> y >> a >> b){int xx, yy, aa, bb;xx = a; yy = b;aa = x - a;bb = y - b;if (xx == aa&&yy == bb)printf("YES\n");else printf("NO\n");}return 0;}

0 0
原创粉丝点击