Submission #34592

# Submission time Handle Problem Language Result Execution time Memory
34592 2017-11-14T05:42:04 Z 5ak0 Utrka (COCI14_utrka) C++14
0 / 80
0 ms 2212 KB
/*
ID: 5ak0
PROG:
LANG: C++11
*/

#include <bits/stdc++.h>
#define fr first
#define sc second
#define pb push_back
#define mpr make_pair

using namespace std;

typedef long long ll;
typedef pair<int, int> pii;
const int INF = 1e9 + 7;

int n;
string s[1010], x;
map <string, bool> mp;

int main(){
    #ifndef SAKO
    //freopen(".in", "r", stdin);
    //freopen(".out", "w", stdout);
    #endif // SAKO
    ios_base::sync_with_stdio(0);

    cin >> n;
    for (int i = 1; i <= n; ++i){
        cin >> s[i];
    }
    for (int i = 1; i < n; ++i){
        cin >> x;
        ++mp[x];
    }
    for (int i = 1; i <= n; ++i)
        if (mp[s[i]] % 2 == 0)
            cout << s[i];

    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 2212 KB Output is correct
2 Incorrect 0 ms 2212 KB Output isn't correct
3 Halted 0 ms 0 KB -