11.18

include

include

include

using namespace std;
int main(){
vectorA,B,C;
int num;
while(cin>>num&&num!=-1){
A.push_back(num);
}
while(cin>>num&&num!=-1){
B.push_back(num);
}
C.insert(C.end(),A.begin(),A.end());
C.insert(C.end(),B.begin(),B.end());
sort(C.begin(),C.end());
if(!C.empty()){
vectorresult;
result.push_back(C[0]);
for(size_t i=1;i<C.size();++i){
if(C[i]!=C[i-1]){
result.push_back(C[i]);
}
}
C=result;
}
for(size_t i=0;i<C.size();++i){
if(i>0){
cout<<",";
}
cout<<C[i];
}
cout<<endl;
return 0;
}

posted @ 2025-11-24 09:28  Cx330。  阅读(3)  评论(0)    收藏  举报