922A |
|
本来认为很简单,提交无数次才意识到 wa点真多
看来读题和分类讨论能力也要训练啊
分析:
(x,y) (0,1)
(1,2)
(2,3) (3,2)
(3,4) (4,3) (5,3)
扫描二维码关注公众号,回复:
5771241 查看本文章
#include<bits/stdc++.h>
#define ll long long
#define en '\n'
const int mod=1e9+7;
using namespace std;
int x,y;
int main() {
#ifdef local
freopen("input2.txt","r",stdin);
#endif // local
cin>>x>>y;
if(x>=1&&y>=2){
x-=1;
y-=2;
if(y>x)return cout<<"no",0;
x-=y;
if(x&1)cout<<"no";
else cout<<"yes";
}
else{
if(x==0&&y==1){
cout<<"yes";
}
else cout<<"no";
}
return 0;
}