Untitled
unknown
plain_text
a year ago
402 B
8
Indexable
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long n,c=0,dem[1000]={0},xmax=0;
cin >> n;
long long a[205];
for (int u = 0; u < n; u++)
{
cin >> a[u];
dem[a[u]]++;
if (xmax<a[u]) xmax=a[u];
}
for (int u=0; u<=xmax; u++ )
{
if (dem[u]!=0)c++;
}
cout << c;
return 0;
}
Editor is loading...
Leave a Comment