Advertisement
YauhenMardan

Untitled

May 5th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. #include <iostream>
  2. #include <vector>
  3. #include <set>
  4. #include <algorithm>
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. int n;
  10. cin>>n;
  11. vector<int> a(n);
  12. set<int> set_a;
  13. for(int i=0; i<n; i++)
  14. {
  15. cin>>a[i];
  16. set_a.insert(a[i]);
  17. }
  18. cout<<n - set_a.size();
  19. return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement