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

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

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 .

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

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

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 лет назад, # ^ |
      Проголосовать: нравится +5 Проголосовать: не нравится

    Yups but how is it proven ?

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

      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.