poj1740 A New Stone Game(博弈)

Alice and Bob decide to play a new stone game.At the beginning of the game they pick n(1<=n<=10) piles of stones in a line. Alice and Bob move the stones in turn.At each step of the game,the player choose a pile,remove at least one stones,then freely move stones from this pile to any other pile that still has stones.For example:n=4 and the piles have (3,1,4,2) stones.If the player chose the first pile and remove one.Then it can reach the follow states.2 1 4 21 2 4 2(move one stone to Pile 2)1 1 5 2(move one stone to Pile 3)1 1 4 3(move one stone to Pile 4)0 2 5 2(move one stone to Pile 2 and another one to Pile 3)0 2 4 3(move one stone to Pile 2 and another one to Pile 4)0 1 5 3(move one stone to Pile 3 and another one to Pile 4)0 3 4 2(move two stones to Pile 2)0 1 6 2(move two stones to Pile 3)0 1 4 4(move two stones to Pile 4)Alice always moves first. Suppose that both Alice and Bob do their best in the game.You are to write a program to determine who will finally win the game.

,别想一下造出大海,必须先由小河川开始。

poj1740 A New Stone Game(博弈)

相关文章:

你感兴趣的文章:

标签云: