标签:string pen img names pre display none init algo
#include <iostream> #include <string> #include <cstdio> #include <cmath> #include <cstring> #include <algorithm> #include <vector> #include <queue> #include <deque> #include <map> #define range(i,a,b) for(int i=a;i<=b;++i) #define LL long long #define rerange(i,a,b) for(int i=a;i>=b;--i) #define fill(arr,tmp) memset(arr,tmp,sizeof(arr)) using namespace std; map<int,bool>nn; int n; void init(){ cin>>n; while(n--){ int tmp; cin>>tmp; nn[tmp]=true; } } void solve(){ int ans=0; map<int,bool>::iterator iter; for(iter=nn.begin();iter!=nn.end();++iter)ans+=(iter->second?1:0); cout<<ans<<endl; } int main() { init(); solve(); return 0; }
标签:string pen img names pre display none init algo
原文地址:https://www.cnblogs.com/Rhythm-/p/9339304.html