Advertisement
a53

bitsort

a53
Jan 23rd, 2017
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. #include <iostream>
  2. #include <bitset>
  3. using namespace std;
  4. bitset<300001>v;
  5. int n,x;
  6.  
  7. int main()
  8. {
  9. cin>>n;
  10. for(int i=0;i<n;++i)
  11. cin>>x,v[x]=1;
  12. for(int i=1;i<=300000;++i)
  13. if(v[i])
  14. cout<<i<<' ';
  15. return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement