Изменения рейтингов за последние раунды временно удалены. Скоро они будут возвращены. ×

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

Автор JeevanJyot, 20 месяцев назад, По-английски

We invite you to participate in CodeChef’s Starters 51, this Wednesday, 10th August, rated for Div 2, 3 & 4 participants.

Time: 8 PM — 11:00 PM IST

Joining us on the problem setting panel are:

The video editorials of the problems will be available on our YouTube channel as soon as the contest ends. Subscribe to get notifications about our new editorials.

Also, if you have some original and engaging problem ideas and are interested in them being used in CodeChef's contests, you can share them here.

Hope to see you participating. Good Luck!

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

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

Reminder: Contest starts in 20 mins.

»
20 месяцев назад, # |
  Проголосовать: нравится +10 Проголосовать: не нравится

Hint for Chef and Cook game???

  • »
    »
    20 месяцев назад, # ^ |
    Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

    Reducible to NIM game...A[i] elements at index 'i' have distance N — i from the end of the array ,which is equivalen to having N-i stones in a NIM pile..

    • »
      »
      »
      20 месяцев назад, # ^ |
      Rev. 3   Проголосовать: нравится 0 Проголосовать: не нравится

      Can you explain this fact

      A[i] elements at index 'i' have distance N — i from the end of the array ,which is equivalent to having N-i stones in a NIM pile..

      a bit more..

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

        If you are familiar with NIM game(Sprague grundy theorum)..WLOG consider A[i] = 0 or A[i] = 1.(binary array)...If A[i] = 1..This element can be moved to any index j>i and j<=N. You can perform a move on this element till its index becomes N. In other words the value of N — i can be decreased by any amount just like game of NIM.

        This can be extended to any array A .. by transforming A[i] = A[i]%2 since x^x = 0 and the parity of A[i] only matters.

  • »
    »
    20 месяцев назад, # ^ |
      Проголосовать: нравится +5 Проголосовать: не нравится
    Short solution outline

    You can also have a look at the complete editorial.