竞赛
考级
x,y = input().split() x = int(x) y = int(y) if -1<=x<=1 and -1<=y<=1: print("yes") else: print("no")
#include<bits/stdc++.h> using namespace std; int main(){ int a,b; cin>>a>>b; if(a0&&b0){ cout<<"yes"; return 0; } if(a1&&b-1){ cout<<"yes"; } else if(a1&&b1){ cout<<"yes"; } else if(a==-1&&b==-1){ cout<<"yes"; } else if(a==-1&&b==1){ cout<<"yes"; } else{ cout<<"no"; } return 0; }
#include<bits/stdc++.h> using namespace std; int main(){ int a,b; cin>>a>>b; if(a1&&b1){ cout<<"yes"; }else if(a1&&b-1){ cout<<"yes"; }else if(a==-1&&b==-1){ cout<<"yes"; }else if(a0&&b0){ cout<<"yes"; }else if(a==-1&&b==1){ cout<<"yes"; }else{ cout<<"no"; } return 0; }
#include <iostream> using namespace std; int main(){ int x,y; cin>>x>>y; if(x>1||x<-1||y>1||y<-1) cout<<"no"; else cout<<"yes"; return 0; }
共49条
提交答案之后,这里将显示提交结果~