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

建议使用的浏览器:

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

2869:Paper Cutting Game

题目描述
Lily and Lucy are playing a new paper cutting game.
The game uses a rectangular paper that consists of W*H grids.At first,there is only a sheet of W*H paper. In each turn,One player picks up cut one piece of paper and cut it into several pieces of equal rectangular sections,and puts them back. Lily can only cut horizontally and Lucy can only cut vertically,keeping every grids unbroken.The one who can’t cut the paper loses.
Now given you a sheet of W*H paper.We know Lily always plays first.We can assume that both player are clever enough to make the right move.Could you help Lily to make sure if she can win the game?
输入解释
Input contains multiple cases.
Each test case starts with two integerW(1<=N<=1000) ,H(1<=H<=1000) ,says that there is a sheet of W*H paper at firsst.
输出解释
For each test case, if Lily can win the game output “Win”,otherwise output “Lose”.
输入样例
1 1
2 2
4 2
6 4
输出样例
Lose
Lose
Win
Lose
提示
Hint
In sample 3,we have a sheet of 4*2 paper.Lily may cut the paper into 2*2,2*2 or 1*2,1*2,1*2,1*2.
Obviously Lily would choose the first kind of move.Lucy then can only pick up one 2*2 paper and cut it into 2*1,2*1.We know that Lily is sure to win.
来自杭电HDUOJ的附加信息
Recommend gaojie

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

源链接: HDU-2869

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

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 32768/32768K(Java/Others)