#include <bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >> n;
string a[n];
for(int i = 0; i < n; i++){
cin >> a[i];
}
unordered_map <string, int> freq;
string b[n - 1];
for(int i = 0; i < n - 1; i++){
cin >> b[i];
freq[b[i]] = 0;
}
for(int i = 0; i < n - 1; i++){
freq[b[i]]++;
}
for(int i = 0; i < n; i++){
if(freq[a[i]] == 0){
cout << a[i];
}
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
296 KB |
Output is correct |
2 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |