Submission #1285695

#TimeUsernameProblemLanguageResultExecution timeMemory
1285695goshgar_468Utrka (COCI14_utrka)C++20
80 / 80
97 ms12192 KiB
#pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;

# define int long long
//# define QR ios_base::sync_with_stdio(false); cin.tie(); cout.tie();
# define endl '\n'
# define all(x) x.begin(), x.end()
# define ff first
# define ss second
# define pb push_back

void CASE() {
    int n ;
    cin >> n ;
    map < string , int > mp ;
    vector < string > a ;
    for(int i = 0 ; i < n ; i++){
        string s ;
        cin >> s ;
        mp[s]++ ;
        a.pb(s) ;
    }
    for(int i = 0 ; i < n-1 ; i++){
        string s ;
        cin >> s ;
        mp[s]-- ;
    }
    for(int i = 0 ; i < n ; i++){
        if(mp[a[i]] > 0){
            cout << a[i] << endl ;
            return ;
        }
    }
}

signed main() {
    ios_base::sync_with_stdio(false); cin.tie(); cout.tie();
    int TESTS = 1;
    // cin >> TESTS ;
    while (TESTS--)
        CASE();

    return 0;
}
#Verdict Execution timeMemoryGrader output
Fetching results...