meintoo's blog

By meintoo, history, 9 years ago, In English

Hello community,
Recently, I was trying to solve 156C - Cipher . After a lot of tries , I couldn't get anywhere.
Further there is no english editorial for the same too and I couldn't get it exactly through the codes.
Kindly help .
Thanks in advance .

  • Vote: I like it
  • +11
  • Vote: I do not like it

»
9 years ago, # |
  Vote: I like it +11 Vote: I do not like it

Two words coincide in their meaning iff their sum and length is equal. Then it's easy to solve this problem using this fact, but I don't know how to prove it.

  • »
    »
    9 years ago, # ^ |
      Vote: I like it +5 Vote: I do not like it

    Yups but how is it proven ?

    • »
      »
      »
      9 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Let's say there are N buckets numbered from 1 to N. Each bucket initially contains B_i balls. In each move, you can select any bucket, take a ball from it and place it on any of its adjacent buckets. However there cannot be more than 25 balls in any bucket at any moment. How many different combinations are possible given that you have infinite number of moves?

      It's easier to visualize and I think the proof is kind of obvious if you re-formulate the problem like this.