#include <bits/stdc++.h>
using namespace std;
int n;
string s[100001],ch;
map<string,int> check;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);cout.tie(0);
cin >> n;
for (int i=1;i<=n;++i) cin >> s[i],++check[s[i]];
for (int i=1;i<n;++i) {
cin >> ch;
--check[ch];
}
for (int i=1;i<=n;++i) if (check[s[i]]) {
cout << s[i];
return 0;
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
3416 KB |
Output is correct |
2 |
Correct |
1 ms |
3416 KB |
Output is correct |
3 |
Correct |
2 ms |
3588 KB |
Output is correct |
4 |
Correct |
2 ms |
3708 KB |
Output is correct |
5 |
Correct |
2 ms |
3596 KB |
Output is correct |
6 |
Correct |
45 ms |
9096 KB |
Output is correct |
7 |
Correct |
86 ms |
12032 KB |
Output is correct |
8 |
Correct |
85 ms |
13820 KB |
Output is correct |
9 |
Correct |
99 ms |
14616 KB |
Output is correct |
10 |
Correct |
86 ms |
14676 KB |
Output is correct |