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

建议使用的浏览器:

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

1404:Digital Deletions

题目描述
Digital deletions is a two-player game. The rule of the game is as following.

Begin by writing down a string of digits (numbers) that's as long or as short as you like. The digits can be 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 and appear in any combinations that you like. You don't have to use them all. Here is an example:



On a turn a player may either:
Change any one of the digits to a value less than the number that it is. (No negative numbers are allowed.) For example, you could change a 5 into a 4, 3, 2, 1, or 0.
Erase a zero and all the digits to the right of it.


The player who removes the last digit wins.


The game that begins with the string of numbers above could proceed like this:



Now, given a initial string, try to determine can the first player win if the two players play optimally both.
输入解释
The input consists of several test cases. For each case, there is a string in one line.

The length of string will be in the range of [1,6]. The string contains only digit characters.

Proceed to the end of file.
输出解释
Output Yes in a line if the first player can win the game, otherwise output No.
输入样例
0
00
1
20
输出样例
Yes
Yes
No
No
来自杭电HDUOJ的附加信息
Author ZHENG, Jianqiang
Recommend Ignatius.L

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

源链接: HDU-1404

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

共提交 172

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