fork download
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. void fastscan(int &x)
  4. {
  5. bool neg=false;
  6. register int c;
  7. x =0;
  8. c=getchar();
  9. if(c=='-')
  10. {
  11. neg = true;
  12. c=getchar();
  13. }
  14. for(;(c>47 && c<58);c=getchar())
  15. x = (x<<1) + (x<<3) +c -48;
  16. if(neg)
  17. x *=-1;
  18. }
  19.  
  20. int main()
  21. {
  22. int a,b,c,d,e,f,g,h;
  23. fastscan(a);
  24. map <int,int> my;
  25. for(b=0;b<a;b++)
  26. {
  27. fastscan(g);
  28. my[g]++;
  29.  
  30. }
  31. map <int,int> :: iterator it;
  32. for(it=my.begin();it!=my.end();it++)
  33. {
  34. if(it->second == 1)
  35. {
  36. printf("%d\n",it->first);
  37. break;
  38. }
  39. }}
  40.  
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
Standard output is empty