#include <bits/stdc++.h>
using namespace std;
int N;
map<string, int> C;
int main() {
cin >> N;
for(int i = 0; i < N; i++) {
string s; cin >> s;
C[s]++;
}
for(int i = 0; i < N-1; i++) {
string s; cin >> s;
C[s]--;
}
for(auto c : C) {
if(c.second == 1) cout << c.first;
}
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
1680 KB |
Output is correct |
2 |
Correct |
0 ms |
1680 KB |
Output is correct |
3 |
Correct |
0 ms |
1680 KB |
Output is correct |
4 |
Correct |
0 ms |
1680 KB |
Output is correct |
5 |
Correct |
0 ms |
1680 KB |
Output is correct |
6 |
Correct |
200 ms |
7224 KB |
Output is correct |
7 |
Correct |
312 ms |
9864 KB |
Output is correct |
8 |
Correct |
384 ms |
11712 KB |
Output is correct |
9 |
Correct |
444 ms |
12768 KB |
Output is correct |
10 |
Correct |
428 ms |
12768 KB |
Output is correct |