#include <iostream>
#include <set>
using namespace std;
int main() {
multiset<string> s;
int n;
cin>>n;
for (int i=1;i<=n;i++){
string ss;
cin>>ss;
s.insert(ss);
}
for (int i=1;i<n;i++){
string ss;
cin>>ss;
s.erase(s.find(ss));
}
cout<<*begin(s)<<endl;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
2 ms |
348 KB |
Output is correct |
5 |
Correct |
2 ms |
348 KB |
Output is correct |
6 |
Correct |
61 ms |
5688 KB |
Output is correct |
7 |
Correct |
90 ms |
8468 KB |
Output is correct |
8 |
Correct |
142 ms |
10068 KB |
Output is correct |
9 |
Correct |
223 ms |
11096 KB |
Output is correct |
10 |
Correct |
138 ms |
11192 KB |
Output is correct |