当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

3557:Divide Game

题目描述
Divide Game is a combination of the two games.
First, given a string, one of the player's task is to divide the string into several nonempty strings, we define a legal division generates several shorter strings in the order as they are in the original string, and every two adjacent strings are not similar. We call two strings are similar only if they have at least one character whose number of occurrences in the two strings are equal and not zero.
Then they two play another totally different sub-divide game. To ensure fairness, another player has the first chance.
In this game, two players make an operation in turn. In a round, a player chooses one string, divides the pile into two non-similar strings, if he can't divide it, then he just moves the string away. The one who gets the last operation is the winner.
Now iSea have a clever challenger, who always choose the optimum strategy, if they two play the divide game, and iSea have the chance to divide the string in the first game, can he win the final game?
输入解释
There are several test cases in the input.

Each test case only contain one string (length <= 50000, and only include uppercase), indicating the original string.

The input terminates by end of file marker.
输出解释
For each test case, output "Yes" if iSea can win, otherwise output "No".

输入样例
AA
ABC
输出样例
No
Yes
来自杭电HDUOJ的附加信息
Author iSea@WHU
Recommend zhouzeyong

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-3557

最后修改于 2020-10-25T23:04:44+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
4000/2000MS(Java/Others) 131072/65536K(Java/Others)