Falak_Ahmed_Shakib

set easy

Aug 22nd, 2019
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. typedef long long ll;
  4. #define fastread()(ios_base:: sync_with_stdio(false),cin.tie(NULL));
  5. int main()
  6. {
  7. fastread();
  8.  
  9. set<int>s;
  10. int n;
  11. cin>>n;
  12. while(n--)
  13. {
  14. int a;
  15. cin>>a;
  16. s.insert(a);
  17. }
  18. for(auto x:s)
  19. {
  20. cout<<x<<endl;
  21. }
  22. cout<<" "<<s.size()<<" "<<s.empty();
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment