Submission #85886

# Submission time Handle Problem Language Result Execution time Memory
85886 2018-11-22T13:33:41 Z memetkagan44 Utrka (COCI14_utrka) C++11
80 / 80
324 ms 22340 KB
#include<bits/stdc++.h>
using namespace std;
string ar[100005],str;
int n;
map<string,int> mp;
int main(){
    cin >> n;
    for(int i=0;i<n;i++){
        cin >> str;
        mp[str]++;
        ar[i]=str;
    }
    for(int i=1;i<n;i++){
        cin >> str;
        mp[str]--;
    }
    for(int i=0;i<n;i++)
        if(mp[ar[i]]!=0){
            cout << ar[i] << endl;
            break;
        }
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 5 ms 3576 KB Output is correct
2 Correct 4 ms 3708 KB Output is correct
3 Correct 6 ms 3848 KB Output is correct
4 Correct 7 ms 3916 KB Output is correct
5 Correct 7 ms 4128 KB Output is correct
6 Correct 145 ms 9628 KB Output is correct
7 Correct 263 ms 13456 KB Output is correct
8 Correct 310 ms 17096 KB Output is correct
9 Correct 324 ms 20160 KB Output is correct
10 Correct 318 ms 22340 KB Output is correct