#include <bits/stdc++.h>
using namespace std;
#define int long long
void solve(){
int n; cin >>n;
vector <string> names(n);
for(int i=0; i<n; i++){
string s;
cin >>s;
names[i]=s;
}
sort(names.begin(),names.end());
vector <string> ans(n-1);
for(int i=0; i<n-1; i++){
string s;
cin >>s;
ans[i]=s;
}
sort(ans.begin(),ans.end());
bool flag = false;
for(int i=0; i<n-1; i++){
cout <<names[i]<<" "<<ans[i]<<endl;
if(names[i]!=ans[i]){
cout <<names[i]<<endl;
flag = true;
break;
}
}
if(!flag) cout <<names[n-1];
}
signed main(){
int t=1;// cin >>t;
while(t--){
solve();
}
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |