在n+m为偶数或n-m的绝对值为大于1的奇数时,Bob有绝对优势
代码如下:
#include <iostream>
using namespace std;
int A(int a)
{
return a<0?(-a):a;
}
int main()
{
int x,y,z;
while(cin>>x>>y)
{
z=!((x+y)%2)||(A(x-y)%2&&(A(x-y)-1))?1:0;
if(z)
cout<<"YES"<<endl;
else
cout<<"NO"<<endl;
}
return 0;
}