General
 
 
# Author Problem Lang Verdict Time Memory Sent Judged  
256795320 Practice:
AlGoreRhythm
1848A - 34 C++20 (GCC 13-64) Wrong answer on test 1 30 ms 24 KB 2024-04-15 17:51:31 2024-04-15 17:51:34
→ Source
#include <iostream>
#include <vector>
using namespace std;
typedef long long ll;

void solve() {
    ll n, m, k; //Size of mall and # of Vika's friends
    ll x, y; //Vika's coordinate
    cin >> n >> m >> k >> x >> y;

    //For each of vika's friends, check whether they are in the same square as her. If so, print NO
    for(int i = 0; i < k; i++) {
        int xx, yy;
        cin >> xx;
        cin >> yy;
        if((x + y) % 2 == (xx + yy) % 2) {
            cout << "NO" << endl;
            return;
        }
    }
    cout << "YES" << endl;
}

int main() {
    int t;
    cin >> t;
    while(t--) {
        solve();
    }
}
?
Time: ? ms, memory: ? KB
Verdict: ?
Input
?
Participant's output
?
Jury's answer
?
Checker comment
?
Diagnostics
?
Click to see test details