Submission #88582

# Submission time Handle Problem Language Result Execution time Memory
88582 2018-12-06T18:27:32 Z tushar_2658 Utrka (COCI14_utrka) C++14
80 / 80
227 ms 22176 KB
#include "bits/stdc++.h"
using namespace std;

typedef long long ll;
#define file freopen("in.txt", "r", stdin);
#define pii pair<int,int>
#define pb push_back
#define all(v) v.begin(), v.end()
#define keepunique(v)   (v).erase(unique(all(v)),v.end())
#define fastread ios_base::sync_with_stdio(false);cin.tie(NULL);

map<string, int>mp;
int n;
string s[100005];

int main(){
	//file
	fastread
	cin>>n;
	for(int i=1; i<=n; i++){
		cin>>s[i];
		mp[s[i]]++;
	}
	for(int i=1; i<=n-1; i++){
		string x;
		cin>>x;
		mp[x]++;
	}
	for(int i=1; i<=n; i++){
		if(mp[s[i]]%2 != 0){
			cout<<s[i]<<endl;
			return 0;
		}
	}
}
# Verdict Execution time Memory Grader output
1 Correct 5 ms 3448 KB Output is correct
2 Correct 4 ms 3480 KB Output is correct
3 Correct 5 ms 3648 KB Output is correct
4 Correct 6 ms 3676 KB Output is correct
5 Correct 6 ms 3716 KB Output is correct
6 Correct 99 ms 9376 KB Output is correct
7 Correct 189 ms 13316 KB Output is correct
8 Correct 223 ms 16908 KB Output is correct
9 Correct 227 ms 19912 KB Output is correct
10 Correct 222 ms 22176 KB Output is correct