Hi,

I tried my best to understand this question TREEMX, but couldn’t get it what is exactly asked in this question.

Solving it is a completely different thing.

When I’m writing this post, total submissions done on this questions were 9, with an accuracy of 11%, which translates to only 1 person that I suspect was done the author himself.

Any help and walk over the example input / output would be helpful.

Thanking in advance.

Thanks for clarifying that. Apologies. Probably I should not have highlighted into my question anything about the author and the submissions stats. all the response were highlighted around that, except from addressing the crux of what was asked: explanation.

1 Like

Consider a permutation P=(v_i,v_j,_v_k...). Set A_i=MEX(u_{i1},u_{i2},u_{i3}....) where (u_{i1},u_{i2},u_{i3}....) are neighbors of corresponding v_i in P. Its obvious that we can get same A for multiple permutations P. Find number of distinct A sequences possible over all n! P.

1 Like

Does anyone know how to do this problem??

I am trying to understand this problem can someone pls help me ?

So as per the problem statement eg

P(2,3,1). A§ = (1,0,1) - >But i dont understand how they got this. As per my understanding:

-First assign all values to -1

A = (-1, -1, -1)

-Now taking v1 from P i.e 2. As 2’s neighbours are 1, 3 their Ai is -1, -1

So MEX(-1,-1) => 0

Is this approach correct ?

1 Like