Блог пользователя saurabhsuniljain

Автор saurabhsuniljain, история, 9 лет назад, По-английски

Problem : Rupsa and the Game Editorial : link

Wrong thing with Editorial :

But how many already existing sequence are there? Clearly, 2^(k−1) but when two pairs equal numbers are there then there will not 2^(k-1) sequences because of repetion of sequences, like suppose we have 1, 2, 2, 3, 3 We can obtain : 1 -> 1 2 -> 1 2 3 -> 2 1 2 3 -> 3 2 1 2 3 Also, : 1 -> 2 1 -> 3 2 1 -> 3 2 1 2 -> 3 2 1 2 3. So I think the approach is wrong and all have blind folded solved this problem.

I have also commented it there, but admin haven't replied yet. Can someone please check what I am saying is correct or not.

  • Проголосовать: нравится
  • -7
  • Проголосовать: не нравится

»
9 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Auto comment: topic has been updated by saurabhsuniljain (previous revision, new revision, compare).

»
9 лет назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

The problem statement mentions that

Two gameplays are different, if after writing down all N + 1 numbers, when we read from left to right, there exists some position i, at which the gameplays have aj and ak written at the ith position such that j ≠ k

So what matters is the index of the number, and not the value. So even if we get the same values, they're considered different.