/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 2ms 328.0 KiB
#2 Wrong Answer 89ms 784.0 KiB
#3 Wrong Answer 98ms 828.0 KiB

Code

#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
    ios ::sync_with_stdio(false);
    cin.tie(NULL);
    int t;
    cin>>t;
    while(t--)
    {
        int x,y,a,b,p,q;
        cin>>x>>y>>a>>b>>p>>q;
        int d1=abs(x-p),d2=abs(y-q);
        // if(d1==d2)
        // {
        //     cout<<"Yes\n";
        // }
        // else if(((d1%2==0) &&(d2%2==0)) ||((d1%2==1 && d2%2==1)))
        // {
        //     cout<<"Yes\n";
        // }
        // else
        // {
        //     cout<<"No\n";
        // }
        int dd=abs(d1-d2);
        if(dd==0 || (dd%2==0))
        {
            cout<<"Yes\n";
        }
        else{
            cout<<"No\n";
        }
    }
    return 0;
}

Information

Submit By
Type
Submission
Problem
P1115 Destination
Contest
LU IUJPC : Sylhet Division 2024, Mock Round
Language
C++17 (G++ 13.2.0)
Submit At
2024-12-07 11:45:54
Judged At
2024-12-07 11:45:54
Judged By
Score
10
Total Time
98ms
Peak Memory
828.0 KiB