답안 #483990

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
483990 2021-11-01T19:07:23 Z ktkerem 마라톤 경주 (COCI14_utrka) C++17
80 / 80
129 ms 11208 KB
#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; 
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 1 ms 324 KB Output is correct
4 Correct 1 ms 332 KB Output is correct
5 Correct 1 ms 324 KB Output is correct
6 Correct 56 ms 5824 KB Output is correct
7 Correct 89 ms 8484 KB Output is correct
8 Correct 112 ms 10240 KB Output is correct
9 Correct 129 ms 11208 KB Output is correct
10 Correct 127 ms 11196 KB Output is correct