BISHOPS


Submit solution

Points: 100
Time limit: 1.0s
Memory limit: 493M

Problem type

Comments


  • 1
    10Tin_Le_Vu_Minh  commented on July 14, 2024, 8:49 p.m.

    include<bits/stdc++.h>

    using namespace std; long long N,x,y,u,v; int main() { cin>>N>>x>>y>>u>>v; if((x+y)%2==0 and (u+v)%2==0) cout<<"yes"; else if ((x+y)%2==1 and (u+v)%2==1) cout<<"yes"; else cout<<"no"; return 0; }


  • 0
    10Tin_Nghia  commented on July 14, 2024, 8:44 p.m.

    include <bits/stdc++.h>

    using namespace std; long long x,y,u,v; int main() { cin>>x>>y>>u>>v; if((x+y)%2==(u+v)%2) cout<<"Yes"; else cout<<"No"; return 0; }


  • 0
    10Tin_Le_Vu_Minh  commented on July 13, 2024, 11:31 p.m.

    include<bits/stdc++.h>

    using namespace std; long long N,x,y,u,v; int main() { cin>>N>>x>>y>>u>>v; if(x%2==0 and y%2==0 and u%2==0 and v%2==0) cout<<"yes"; else if(x%2==1 and y%2==1 and u%2==0 and v%2==0) cout<<"yes"; else if(x%2==0 and y%2==0 and u%2==1 and v%2==1) cout<<"yes"; else if(x%2==1 and y%2==1 and u%2==1 and v%2==1) cout<<"yes"; else if(x%2==0 and y%2==1 and u%2==0 and v%2==1) cout<<"yes"; else if(x%2==0 and y%2==1 and u%2==1 and v%2==0) cout<<"yes"; else if(x%2==1 and y%2==0 and u%2==1 and v%2==0) cout<<"yes"; else if(x%2==1 and y%2==0 and u%2==0 and v%2==1) cout<<"yes"; else cout<<"no"; return 0;

    }