I am a newbie on Codechef.
Any help will be appreciated
If it is given in the problem statement that :
โAll elements of the given array are pairwise distinct, does it mean that all the elements of the array are distinct ?โ
Thanks in advance!
pairwise distinct means that,each element canโt be repeat more than once.
Ex:
1 2 200 345 12 45 โ> In this one,all are pairwise distinct.
1 2 200 200 12 12 โ> This is not pairwise distinct since, 200 12 are occur 2 times each.
It means that each pair of integers in the sequence are distinct. In other words, there are no 2 integers in the sequence that are the same.
Eg: 2,4,3 follows this whereas 2,4,3,4 does not ( because there is a pair of integers that are NOT distinct namely 4,4 ).
To be pairwise distinct all the elements must be distinct?
In other words, pairwise distinct means, all of the elements are unique, none of them is repeated.
Found a good explanation here between distinct and pairwise distincthttps://brilliant.org/discussions/thread/pairwise-distinct/
@rioji there is difference btw pairwise distinct and distinct
2 5 9 8 these are distinct
22 2 4 5 2 are pairwise distinct cause no two pairs are same
but in this case
2 5 30 5 6 0
here in this
2 5 <-pair
is two times so all pairs are not distinct
there is difference btw pairwise distinct and distinct
2 5 9 8 these are distinct
22 2 4 5 2 are pairwise distinct cause no two pairs are same
but in this case
2 5 30 5 6 0
here in this
2 5 <-pair
is two times so all pairs are not distinct
Is 1 2 1 is pairwise distinct
Or 1 2 3 1 is pairwise distinct i am so confused
Please help me out
None of them are pairwise distinct. Pairwise distinct means, every integer is unique i.e. each must occur only once
Here you go @venkata_raman1, meaning of Pairwise distinct. Anyways, this is an old post, so tagging them would probably not gonna help.
You are 6* and you are saying that you are newbie.
If you are new to cp/codechef, you will never know, who this legend OP was
22 2 <-pair
is also 2 times in {22 2 4 5 2}
So, why they didnโt say distinct element why does they add pair word init it must have mean something right?
i think pair wise distinct means no two side by side pairs sould be same? is it like that?
Pairwise Distinct integers
Pairwise distinct integers are a set of numbers where no two numbers are the same. In such a set, every pair of numbers is different from each other.
If every pair of numbers in the array is different, it means all the numbers are different.