Thing we have to notice here is that the game can't have different outcomes if played different way. Consider the pile i , which has A[i] elements, how many times a move can took place for pile i, as long as there are full i-s in A[i] which means A[i]/i times, we can calculate the total number of moves possible for all the piles and in the end if it is an odd number then Alice will win.
No comments:
Post a Comment