原题面:
The game of 31 was a favourite of con artists who rode the railroads in days of yore. The game
is played with a deck of 24 cards: four labelled each of 1, 2, 3, 4, 5, 6. The cards in the deck are
visible to both players, who alternately withdraw one card from the deck and place it on a pile.
The object of the game is to be the last player to lay a card such that the sum of the cards in
the pile does not exceed 31. Your task is to determine the eventual winner of a partially played
game, assuming each player plays the remainder of the game using a perfect strategy.
For example, in the following game player B wins:
Player A plays 3
Player B plays 5
Player A plays 6
Player B plays 6
Player A plays 5
Player B plays 6
我提交的翻译:
《游戏31》是昔日乘坐铁路的骗子的最爱。游戏用一副 24 张牌玩:1,2,3,4,5,6 各有四张牌。牌组中的牌是对两个玩家可见,他们交替地从卡组中取出一张牌并将其放在一堆牌上。游戏的目标是成为最后一个放置一张牌的玩家,使得牌的总和点数不超过 31。
您的任务是确定部分游戏的最终获胜者。
游戏假设每个玩家使用完美的策略玩游戏。
例如,在以下游戏中,玩家 B 获胜:
玩家 A 放置 3
玩家 B 放置 5
玩家 A 放置 6
玩家 B 放置 6
玩家 A 放置 5
玩家 B 放置 6