Submission #721261

#TimeUsernameProblemLanguageResultExecution timeMemory
721261vjudge1Zamjena (COCI18_zamjena)C++17
0 / 70
4 ms1492 KiB
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define F first
#define S second

using namespace std;

int main() {

	ios_base::sync_with_stdio(0); cin.tie(0);

    int n; cin >> n;
    vector <string> v (n);
    vector <string> x (n);
    for (int i = 0; i < n; i++) {
        cin >> v[i];
    }
    for (int i = 0; i < n; i++) {
        cin >> x[i];
    }

    for (int i = 0; i < n; i++) {
        if (v[i] == "x" || v[i] == "y") {
           if (x[i] == "x" || x[i] == "y") {
                v[i] = "3";
           } else {
               v[i] = x[i];
           }
        }
    }
    for (int i = 0; i < n; i++) {
        if (x[i] == "x" || x[i] == "y") {
           x[i] = v[i];
        }
    }
    int cnt = 0;
    for (int i = 0; i < n; i++) {
        if (x[i] == v[i]) {
            cnt++;
        }
    }
    if (cnt == n) {
        cout << "DA";
    } else {
        cout << "NE";
    }

	return 0;
}
/**

4
4 5 yo tu
3 yo  3 tu

5
x 3 x y 3
x y 4 y 3
3
3 4 5
3 4 x

7 2 1
4 7
**/
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...