Submission #76781

# Submission time Handle Problem Language Result Execution time Memory
76781 2018-09-17T18:18:17 Z dereotu Utrka (COCI14_utrka) C++17
80 / 80
314 ms 18000 KB
#include <bits/stdc++.h>
#define endl '\n'
#define space ' '
#define st first
#define nd second
#define pb push_back
#define mp make_pair
#define ii pair <int,int>
#define iii pair < int,pair <int,int> >
#define vi vector <int>
#define vii vector < pair<int,int> >
#define forr(i,A,B) for(int i=A;i<B;++i)
#define input(file) freopen(file,"r",stdin)
#define output(file) freopen(file,"w",stdout)
using namespace std;

int n;
map<string,int> h;

int main(){
	cin>>n;
	forr(i,0,n){
		string s;
		cin>>s;
		h[s]++;
	}
	forr(i,0,n-1){
		string s;
		cin>>s;
		h[s]--;
	}
	for(auto it=h.begin();it!=h.end();it++){
		if((it->nd)>0){
			cout<<(it->st)<<endl;
			break;
		}
	}

	return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 2 ms 504 KB Output is correct
2 Correct 2 ms 616 KB Output is correct
3 Correct 3 ms 692 KB Output is correct
4 Correct 4 ms 788 KB Output is correct
5 Correct 4 ms 872 KB Output is correct
6 Correct 130 ms 5996 KB Output is correct
7 Correct 211 ms 9364 KB Output is correct
8 Correct 279 ms 12708 KB Output is correct
9 Correct 300 ms 15784 KB Output is correct
10 Correct 314 ms 18000 KB Output is correct