HDU 5054 Alice and Bob

水------

 两个人的坐标系不同,如果都走到(x,y)能够碰面的话,只有一种可能:在广场矩形的中心位置。 即: 2*x == N 并且 2*y == M。

#include
#include
#include
using namespace std;
int main()
{
    int M,N,x,y;
    while(scanf("%d%d%d%d",&M,&N,&x,&y)!=EOF)
    {
        if(M==2*x&&N==2*y)
        {
            printf("YES\n");
        }
        else
        {
            printf("NO\n");
        }
    }
    return 0;
}

你可能感兴趣的:(HDU,水题)