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

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

I have an idea, but I don't know how to solve it, so I need your help. Please tell me if you have any ways to solve it. Thanks.

Here is the problem:

Give you a tree with $$$ n $$$ nodes that have root, and there are $$$ a_i $$$ stones on the $$$ i $$$ -th node. Two players take turns operating. At any time, the player can move at least $$$ 1 $$$ stone (at most all stones) on one node to a son of it. The player who can't move will lose. Please calculate whether the first player can win.

I don't know how to solve it, so I can't tell you the scale of $$$ n $$$.

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

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

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

»
5 лет назад, # |
Rev. 2   Проголосовать: нравится -36 Проголосовать: не нравится

Edit: I've found a counter-example

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

    Sorry, it is just an idea, so I don't know if there are similar problems...

    Perhaps we can discuss your solution.

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

Consider each stone independently, and calculate SG(x) of them. I think it can work in O(n).