What is the meaning of pairwise distinct integers?

I am a newbie on Codechef.
Any help will be appreciated :slight_smile:
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! :slight_smile:

11 Likes

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.

6 Likes

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 ).

6 Likes

To be pairwise distinct all the elements must be distinct?

2 Likes

In other words, pairwise distinct means, all of the elements are unique, none of them is repeated.

6 Likes

Found a good explanation here between distinct and pairwise distincthttps://brilliant.org/discussions/thread/pairwise-distinct/

2 Likes

@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

5 Likes

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

1 Like

didn’t get you @rv3213. what is the sixth line

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. :sweat_smile:

If you are new to cp/codechef, you will never know, who this legend OP was :joy:

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?