22 lines
371 B
C++
22 lines
371 B
C++
#include <bits/stdc++.h>
|
|
using namespace std;
|
|
|
|
int main () {
|
|
int n;
|
|
cin >> n;
|
|
vector<int>v(n);
|
|
for (int i = 0; i < n; i++) {
|
|
cin >> v[i];
|
|
}
|
|
sort(v.begin(), v.end());
|
|
int out =1;
|
|
for (int i = 0; i < n; i++) {
|
|
if (i!=0){
|
|
if (v[i-1] != v[i]) {
|
|
out++;
|
|
}
|
|
}
|
|
}
|
|
cout<<out;
|
|
}
|