单独的数字
题目描述
输入
输出
样例输入
样例输出
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
#include <iostream> #include <string> #include <cstdio> #include <cmath> #include <map> #include <cstring> #include <algorithm> #define range(i,a,b) for(int i=a;i<=b;++i) #define rerange(i,a,b) for(int i=a;i>=b;--i) #define LL long long #define fill(arr,tmp) memset(arr,tmp,sizeof(arr)) using namespace std; map<int,int>MAP; int n,tmp; void init(){ cin>>n; while(n--){ cin>>tmp; MAP[tmp]++; } } void solve(){ map<int,int>::iterator iter; for(iter=MAP.begin();iter!=MAP.end();++iter) if(iter->second==1){ cout<<iter->first<<endl; return; } } int main(){ init(); solve(); return 0; }