/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 540.0 KiB
#2 Accepted 239ms 1.02 MiB
#3 Accepted 300ms 876.0 KiB
#4 Accepted 300ms 788.0 KiB

Code

#include<bits/stdc++.h>
using namespace std;
#define int long long

int32_t main()
{
	int t; cin>>t;
	while(t--)
    {
        int n,m; cin>>n>>m;
        int st1,st2; cin>>st1>>st2;
        int dst1, dst2; cin>>dst1>>dst2;
        int same =0;
        if((st1%2==st2%2)) same = 1;
        if((dst1%2==dst2%2) && same==1)
        {
            cout<<"Yes\n";
            continue;
        }
        if(same==0)
        {
            if(dst1%2!=dst2%2)
            {
                cout<<"Yes\n";
            }
            else cout<<"No\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:49:36
Judged At
2024-12-07 11:49:36
Judged By
Score
100
Total Time
300ms
Peak Memory
1.02 MiB