Left and Right play a game with a word consisting of L's and R's, alternating turns. On Left's turn, Left can remove any positive number of letters, but not all the letters, from the left side of the word. Right does the same on Right's turn except that Right removes letters from the right side. The game continues until only one letter remains: if it is an 'L' then Left wins; if it is an 'R' then Right wins.
Let
You are given
Find
小左和小右正用一个只含 L、R 的词玩游戏。两人轮流进行操作,轮到小左操作时,小左可以删去这个词左侧的若干个字符,但不能不删或全删;小右可以删去这个词右侧的若干个字符,但不能不删或全删。当这个词只剩一个字母时,游戏结束。如果剩下的字符是 L,那么小左获胜;反之小右获胜。
记
求
点 这个链接 回到源站。
点 这个链接 回到详细版题目目录。