题目大意:给定两个坐标轴点,按照规则走,问两个人能否相遇。
解题思路:简单题,直接举几个例子就可以知道相遇必须满足两个人走的距离点时边长的终点。详见code。
题目来源:http://acm.hdu.edu.cn/showproblem.php?pid=5054
code:
#include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
const int MAXN = 10000;
int n,m,x,y;
int main(){
while(~scanf("%d%d%d%d",&n,&m,&x,&y)){
if(x==n-x && y==m-y) printf("YES\n");
else printf("NO\n");
}
return 0;
}