Advertisement
RusSimona

Varianta50 Sub3 Ex4

Dec 18th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3. int ap[10000];
  4. int main ()
  5. {
  6. int n, i, x;
  7. cin>>n;
  8. for(i=1;i<=n;i++)
  9. {
  10. cin>>x;
  11. ap[x]++;
  12. }
  13.  
  14. for(i=1;i<=9999;i++)
  15. if(ap[i]>=2) cout<<i<<" ";
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement