Submission #483990

#TimeUsernameProblemLanguageResultExecution timeMemory
483990ktkeremUtrka (COCI14_utrka)C++17
80 / 80
129 ms11208 KiB
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
ll _i=0;
#define ffn(x) _i=x
#define fora(y,x) for(ll y=_i;x>y;y++)
#define pb push_back
#define pf push_front
#define debu cout << "hello\n"
#define fi first
#define sec second
const ll limit =998244353; 
const ll ous=1000005;
void solve(){
    ll n;
    cin >> n;
    map<string , ll> mp;
    fora(i,n){
        string h;
        cin >> h;
        mp[h]++;
    }
    vector<ll> y;
    for(auto j:mp){
        y.pb(j.sec);
    }
    ffn(1);
    fora(i , n){
        string h;
        cin >> h;
        mp[h]++;
    }
    string ans;
    ll s = 0;
    for(auto j:mp){
        if(j.sec != 2*y[s]){
            ans = j.fi;
        }
        s++;
    }
    cout << ans ;
    return;
}
int main(){
    ios_base::sync_with_stdio(false);cin.tie(NULL);
    ll t=1;
    //cin >> t;
    while(t--){
        solve();
    }
    return 0; 
}
#Verdict Execution timeMemoryGrader output
Fetching results...