标签:des style color os io 数据 for ar
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; }
HDU 1412 {A} + {B},布布扣,bubuko.com
标签:des style color os io 数据 for ar
原文地址:http://blog.csdn.net/u013582254/article/details/38412335