When submitting a solution in C++, please select either C++14 (GCC 6-32) or C++17 (GCC 7-32) as your compiler. ×

MetB's blog

By MetB, history, 4 years ago, In English

https://www.spoj.com/problems/TEAMNIM/

Yet the most interesting part is when two players from the same team make turns after each other, what kinda reminds index-2 nim but without taking 1 stone from one heap. Probably with correct AABB — ordering it won't be hard to come up to a good BAAB one, since there should be some invariant. Any ideas/hints?

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

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Just analyze winning/losing states, not that hard.

  • »
    »
    4 years ago, # ^ |
    Rev. 2   Vote: I like it +1 Vote: I do not like it

    Ok, thanks. Actually, it can be found in the internet. But just bruteforcing isn't interesting, I was rather interested in theoretical solution. But anyway, thanks.

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Can I get some hints? I have already solved when players of both team alternate but am unable to find out how to solve other cases