标签:rom div content int des desc stream round padding
1 2 1 2 3 1 2 1 1 2
1 2 3 1 2
#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<limits.h> #include<list> using namespace std; int main() { int n,m,x; list<int>s1; list<int>s2; while(cin>>n>>m) { for(int i=0;i<n;i++) { cin>>x; s1.push_back(x); } for(int i=0;i<m;i++) { cin>>x; s2.push_back(x); } s1.merge(s2); s1.sort(); s1.unique(); int cnt=0; while(!s1.empty()) { if(!cnt) cout<<s1.front(); else cout<<" "<<s1.front(); cnt=1; s1.pop_front(); } cout<<endl; } return 0; }
标签:rom div content int des desc stream round padding
原文地址:http://www.cnblogs.com/gccbuaa/p/6915582.html