답안 #146204

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
146204 2019-08-22T20:03:13 Z Fasho 마라톤 경주 (COCI14_utrka) C++14
80 / 80
303 ms 50808 KB
#include <bits/stdc++.h>
#define N 1000005
#define ll long long int 	
#define MP make_pair
#define pb push_back
#define ppb pop_back
#define sp " "
#define endl "\n"
#define fi first
#define se second
#define ii pair<int,int>
#define lli pair<ll,ll>
#define fast cin.tie(0);cout.tie(0);ios_base::sync_with_stdio(false)
#define fast2 freopen ("kmp.in","r",stdin);freopen ("kmp.out","w",stdout);
#define mod 1000000009
#define fs(x,y) for(int i=1;i<=y;i++) cin>>x[i]
#define fo(i,x,y) for(int i=x;i<=y;i++)
#define INF 1000000000005
using namespace std;

ll n,m,ar[N],sum;

string s[N],a;
map<string,int> mp,tut;

int main()
{
	fast;
	cin>>n;
	fo(i,1,n)
		cin>>s[i],tut[s[i]]++;
	fo(i,1,n-1)
	{
		cin>>a;
		mp[a]++;
	}
	fo(i,1,n)
	if(mp[s[i]]<tut[s[i]])
	{
		cout<<s[i];
		return 0;
	}



}



/*     cd onedrive\desktop\kod
cls


*/
# 결과 실행 시간 메모리 Grader output
1 Correct 31 ms 31608 KB Output is correct
2 Correct 31 ms 31608 KB Output is correct
3 Correct 31 ms 31736 KB Output is correct
4 Correct 32 ms 31864 KB Output is correct
5 Correct 32 ms 31864 KB Output is correct
6 Correct 155 ms 41304 KB Output is correct
7 Correct 303 ms 46048 KB Output is correct
8 Correct 301 ms 49140 KB Output is correct
9 Correct 303 ms 50808 KB Output is correct
10 Correct 302 ms 50808 KB Output is correct