/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 540.0 KiB
#2 Accepted 51ms 880.0 KiB
#3 Accepted 60ms 1.023 MiB
#4 Accepted 60ms 1.078 MiB

Code

#include <bits/stdc++.h>
#define ll long long
#define all(v) v.begin(), v.end()
#define endl '\n'
#define nl '\n'
// vector<int> primes;
// bool is_prime[(int)1e7 + 10];
using namespace std;
void solve();
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    int t;
    cin >> t;
    for (int i = 1; i <= t; i++)
    {
        // cout<<"Case "<<i<<": ";
        solve();
    }
}
//seive here
// void seive(int n)
// {
//     is_prime[0] = is_prime[1] = 1;
//     for (int i = 4; i <= 1e7 + 10; i += 2)
//     {
//         is_prime[i] = 1;
//     }
//     for (int i = 3; i * i <= 1e7 + 10; i += 2)
//     {
//         if (is_prime[i] == 0)
//         {
//             for (int j = i + i; j <= 1e7 + 10; j += i)
//             {
//                 is_prime[j] = 1;
//             }
//         }
//     }

//     //for finding primes in a single vector
//     // for (int i = 0; i <= 1e7 + 10; i++)
//     // {
//     //     if (is_prime[i] == 0)
//     //     {
//     //         primes.push_back(i);
//     //     }
//     // }

//     //return;
// }

void solve()
{
    int n, m; cin >> n >> m;
    int x, y; cin >> x >> y;
    int p, q; cin >> p >> q;
    if((x + y) % 2 == 0){
        if((p + q) % 2 == 0){
            cout << "Yes\n";
        }else{
            cout << "No\n";
        }
    }
    else if((p + q) % 2 != 0){
        cout << "Yes\n";
    }
    else cout << "No\n";
}

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 10:49:27
Judged At
2024-12-07 10:49:27
Judged By
Score
100
Total Time
60ms
Peak Memory
1.078 MiB