Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

Distinct Numbers CSES

#include<bits/stdc++.h>
using namespace std;
 
int main(){
 
set<int> s;
 
int n;
cin>>n;
 
	for(int i=0;i<n;i++){
		
		int k;
		cin>>k;
		s.insert(k);	
	}
 
cout<<s.size()<<endl;
}
Source by cses.fi #
 
PREVIOUS NEXT
Tagged: #Distinct #Numbers #CSES
ADD COMMENT
Topic
Name
3+5 =