#include <iostream>
#include <set>
#include <string>
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
multiset<string> S;
int N;
cin >> N;
for(int i = 1; i <= N; i++)
{
string s;
cin >> s;
S.insert(s);
}
for(int i = 1; i <= N-1; i++)
{
string s;
cin >> s;
S.erase(S.find(s));
}
cout << *S.begin() << '\n';
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Correct |
1 ms |
312 KB |
Output is correct |
4 |
Correct |
2 ms |
380 KB |
Output is correct |
5 |
Correct |
4 ms |
324 KB |
Output is correct |
6 |
Correct |
49 ms |
5712 KB |
Output is correct |
7 |
Correct |
129 ms |
8468 KB |
Output is correct |
8 |
Correct |
210 ms |
10144 KB |
Output is correct |
9 |
Correct |
175 ms |
11144 KB |
Output is correct |
10 |
Correct |
240 ms |
11072 KB |
Output is correct |