 What's up guys Mike the coder here today? We're gonna go over CSES distinct numbers I was gonna go over the next problem on CSES, but those problems get extremely difficult And I thought this was the next easiest one. So yeah, we're just gonna do this one. It's distinct numbers It's in us the first problem of sorting it's searching But anyway Yeah, so this problem is not hard at all So that's why I wanted to go over this bear with me guys my throat kind of hurts right now Because I'm kind of a little sick. So yeah, so you're given a list of n numbers and your test is to calculate the number of distinct values So yeah, so here in our input statement. We have five two three two two three so if I were to Take this and draw it out for you guys It's not that hard at all yeah, so like let's say we have this and and This input statement, okay, so this input statement is five This is the size of our array and our ray is two two two three two two three Okay, so Yeah, so given this array of two three two two three we want the number of distinct values so essentially what they means is like the No duplicates in this value. So if I remove all the duplicates of all the elements Here so two is a duplicate. So let's remove that This two is also a duplicate. Let's remove that this three is a duplicate of this three. So let's remove that So in the end, we're just gonna have Elements two three, which is the size of this which is just gonna be two elements Wait, there's only two numbers here one two, right? So that's where the result would just be two So to do this problem, all you have to do is read in the array of two three two two three And then what you're gonna do is you're gonna insert it into a set So once you insert into a set the set basically just removes all the duplicates in the list And then all you have to do is print out the size of the set because the size of the set is just the size Of the set which is just the number of distinct values in the list So the code looks like something like this So yeah, um, yeah, so I created a Array called x and then I have a read an n which is the number of elements in array And then I have a set called g and then I just loop through the Loop through the array and then each time I read in the array of x of i Started from zero to the number of elements of the array and then each time I'm gonna insert the current element into my set and then after that I just print out the size of my set g dot size So g is my set and I just print that out. So yeah, that's essentially the gist of the code. There's not much to it This is long long a lot of means long long and yeah, that's what it means But yeah, I don't have anything else through this. This problem is really easy We'll be guys enjoy this video rate comp subscribe. I'll go over the Other introductory problems later, but yeah as those problems are I my opinion of those are harder than this But yeah, Rick, I'll subscribe about you guys later. Peace