3 条题解

  • 0
    @ 2024-8-13 16:52:43
    #include <iostream>
    using namespace std;
    long long n,m;
    int main () {
    //	freopen("dist.in", "r", stdin);
    //	freopen("dist.out", "w", stdout);
    	cin>>n>>m;
    	if(n>=0&&n<m||n<0&&0-m>n){
    		cout<<"No";
    		return 0;
    	}
    	if(n>=0){
    		m-=n;
    	}
    	if(n<0){
    		m+=n;
    	}
    	if(m%2==0){
    		cout<<"Yes";
    	}
    	else{
    		cout<<"No";
    	}
        return 0;
    }
    
    • 0
      @ 2024-8-13 16:52:33

      #include <iostream> using namespace std; long long n,m; int main () { // freopen("dist.in", "r", stdin); // freopen("dist.out", "w", stdout); cin>>n>>m; if(n>=0&&n<m||n<0&&0-m>n){ cout<<"No"; return 0; } if(n>=0){ m-=n; } if(n<0){ m+=n; } if(m%2==0){ cout<<"Yes"; } else{ cout<<"No"; } return 0; }

      • 0
        @ 2024-8-13 16:48:53

        #include <iostream> using namespace std; long long n,m; int main () { // freopen("dist.in", "r", stdin); // freopen("dist.out", "w", stdout); cin>>n>>m; if(n>=0&&n<m||n<0&&0-m>n){ cout<<"No"; return 0; } if(n>=0){ m-=n; } if(n<0){ m+=n; } if(m%2==0){ cout<<"Yes"; } else{ cout<<"No"; } return 0; }

        • 1

        信息

        ID
        4372
        时间
        1000ms
        内存
        256MiB
        难度
        1
        标签
        递交数
        128
        已通过
        35
        上传者