a53

h_2

a53
Oct 13th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. int n,nr,res;
  4. unordered_map<int,int> m;
  5.  
  6. int main()
  7. {
  8. cin>>n;
  9. for(int i=0;i<n;++i)
  10. cin>>nr,++m[nr];
  11. res=INT_MAX;
  12. for(auto it=m.begin();it!=m.end();++it)
  13. if(it->second==1)
  14. res=min(res,it->first);
  15. cout<<res;
  16. return 0;
  17. }
Add Comment
Please, Sign In to add comment