题目 :Problem - 1412 (hdu.edu.cn)
#include<bits/stdc++.h>
using namespace std;
int main(){set<int> st;int a,b,c;while(cin>>a>>b){int f=1;st.clear();for(int i=1;i<=a+b;i++){cin>>c;st.insert(c);}for(set<int>::iterator it=st.begin();it!=st.end();it++){if(f){printf("%d",*it);f=0;}else{printf(" %d",*it);}}cout<<endl;}return 0;
}