#include <bits/stdc++.h>
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define forcin for(int i=1;i<=n;i++) scanf("%d",&dizi[i]);
#define forcout for(int i=0;i<n;i++) printf("%d ",dizi[i]);
#define ll long long
using namespace std;
int n,t,cevap;
string s[1000005];
map <string,int> mp;
int main()
{
cin>>n;
for(int i=0;i<2*n-1;i++)
{
cin>>s[i];
mp[s[i]]++;
}
for(int i=0;i<2*n;i++)
{
if (mp[s[i]]%2==1)
{
cout<<s[i]<<endl;
break;
}
}
return 0;
}
/*
#include <bits/stdc++.h>
#define int long long
using namespace std;
map<string,int>m;
string s[1001000];
vector<string>v;
signed main()
{
int n;
cin>>n;
for(int i=0; i<2*n-1; i++)
{
cin>>s[i];
m[s[i]]++;
if(m[s[i]]==1)
v.push_back(s[i]);
}
for(int i=0;i<2*n;i++)
{
if(m[s[i]]%2==1)
{
cout<<s[i]<<endl;
break;
}
}
}
*/
/*
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⣠⣶⡾⠏⠉⠙⠳⢦⡀⠀⠀⠀⢠⠞⠉⠙⠲⡀⠀
⠀⠀⠀⣴⠿⠏⠀⠀⠀⠀ ⠀⠀⢳⡀ ⡏⠀⠀⠀⠀⠀⢷
⠀⠀⢠⣟⣋⡀⢀⣀⣀⡀⠀⣀⡀⣧⠀⢸⠀⠀⠀⠀⠀ ⡇
⠀⠀⢸⣯⡭⠁⠸⣛⣟⠆⡴⣻⡲⣿⠀⣸⠀⠀Ez⠀ ⡇
⠀⠀⣟⣿⡭⠀⠀⠀⠀⠀⢱⠀ ⠀⣿⠀⢹⠀⠀⠀⠀⠀ ⡇
⠀⠀⠙⢿⣯⠄⠀⠀⠀⢀⡀⠀⠀⡿⠀⠀⡇⠀⠀⠀⠀⡼
⠀⠀⠀⠀⠹⣶⠆⠀⠀⠀⠀⠀⡴⠃⠀⠀⠘⠤⣄⣠⠞⠀
⠀⠀⠀⠀⠀⢸⣷⡦⢤⡤⢤⣞⣁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⢀⣤⣴⣿⣏⠁⠀⠀⠸⣏⢯⣷⣖⣦⡀⠀⠀⠀⠀⠀⠀
⢀⣾⣽⣿⣿⣿⣿⠛⢲⣶⣾⢉⡷⣿⣿⠵⣿⠀⠀⠀⠀⠀⠀
⣼⣿⠍⠉⣿⡭⠉⠙⢺⣇⣼⡏⠀⠀⠀⣄⢸⠀⠀⠀⠀⠀⠀
⣿⣿⣧⣀⣿.........⣀⣰⣏⣘⣆⣀⠀⠀
░██████╗░█████╗░██╗████████╗░█████╗░███╗░░░███╗░█████╗░
██╔════╝██╔══██╗██║╚══██╔══╝██╔══██╗████╗░████║██╔══██╗
╚█████╗░███████║██║░░░██║░░░███████║██╔████╔██║███████║ SENSEI
░╚═══██╗██╔══██║██║░░░██║░░░██╔══██║██║╚██╔╝██║██╔══██║
██████╔╝██║░░██║██║░░░██║░░░██║░░██║██║░╚═╝░██║██║░░██║
╚═════╝░╚═╝░░╚═╝╚═╝░░░╚═╝░░░╚═╝░░╚═╝╚═╝░░░░░╚═╝╚═╝░░╚═╝
*/
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
16 ms |
31564 KB |
Output is correct |
2 |
Correct |
16 ms |
31564 KB |
Output is correct |
3 |
Correct |
17 ms |
31560 KB |
Output is correct |
4 |
Correct |
18 ms |
31620 KB |
Output is correct |
5 |
Correct |
18 ms |
31652 KB |
Output is correct |
6 |
Correct |
112 ms |
36676 KB |
Output is correct |
7 |
Correct |
181 ms |
39456 KB |
Output is correct |
8 |
Correct |
228 ms |
42852 KB |
Output is correct |
9 |
Correct |
231 ms |
44028 KB |
Output is correct |
10 |
Correct |
210 ms |
43976 KB |
Output is correct |