#include <bits/stdc++.h>
using namespace std;
map<int,int> a;
int main() {
int t;
cin>>t;
while(t!=-1) {
if(a.find(t)==a.end()) {
a[t]=0;
}
a[t]++;
cin>>t;
}
cin>>t;
while(t!=-1) {
if(a.find(t)==a.end()) {
a[t]=0;
}
a[t]++;
cin>>t;
}
for(auto it=a.begin(); it!=a.end(); it++) {
while((*it).second!=0) {
cout<<(*it).first<<" ";
(*it).second--;
}
}
return 0;
}
全部回复 共 0 条
还没有人回复。往下写第一条。
发表回复
登录后即可回复本帖,与出题人和同学一起讨论。
登录