| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 624807 | rm1729 | Utrka (COCI14_utrka) | C++17 | 0 ms | 0 KiB | 
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
#define int long long
void solve(){
    int n; cin >>n;
    map <string,vector <int>> si;
    map <int,string> is;
    for(int i=0; i<n; i++){
        string s;
        cin >>s;
        if(si[s].size()==0) si[s].push_back(0);
        si[s].push_back(i);
        si[s][0]++;
        is[i]=s;
    }
    vector <bool> check(n, true);
    for(int i=0; i<n-1; i++){
        string s;
        cin >>s;
        int k = si[s][si[s][0]];
        si[s][0]--;
        check[k]=false;
    }
    for(int i=0; i<n; i++){
        if(check[i]) cout <<is[i]; 
    }
}
signed main(){
    int t=1;// cin >>t;
    while(t--){
        solve();
    }
    return 0;
}#include <bits/stdc++.h>
using namespace std;
#define int long long
void solve(){
    int n; cin >>n;
    map <string,vector <int>> si;
    map <int,string> is;
    for(int i=0; i<n; i++){
        string s;
        cin >>s;
        if(si[s].size()==0) si[s].push_back(0);
        si[s].push_back(i);
        si[s][0]++;
        is[i]=s;
    }
    vector <bool> check(n, true);
    for(int i=0; i<n-1; i++){
        string s;
        cin >>s;
        int k = si[s][si[s][0]];
        si[s][0]--;
        check[k]=false;
    }
    for(int i=0; i<n; i++){
        if(check[i]) cout <<is[i]; 
    }
}
signed main(){
    int t=1;// cin >>t;
    while(t--){
        solve();
    }
    return 0;
}
