#include <bits/stdc++.h>
using namespace std;
signed main(){
int n; cin>>n;
multiset<string> ms;
string s;
for(int i = 0; i<n; ++i){
cin>>s; ms.insert(s);
}
for(int i = 0; i<n-1; ++i){
cin>>s;
auto itr = ms.find(s);
if(itr != ms.end()) ms.erase(itr);
}
cout<<*ms.begin();
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
1 ms |
348 KB |
Output is correct |
5 |
Correct |
1 ms |
348 KB |
Output is correct |
6 |
Correct |
55 ms |
5716 KB |
Output is correct |
7 |
Correct |
86 ms |
8280 KB |
Output is correct |
8 |
Correct |
107 ms |
10064 KB |
Output is correct |
9 |
Correct |
117 ms |
11188 KB |
Output is correct |
10 |
Correct |
118 ms |
11092 KB |
Output is correct |