英语翻译之3

Split Game

 1000ms  131072K

描述:

Alice and Bob like to cut paper, but they only have one piece of new paper. Both of them want to use this one, but no one wants to split the new paper. Therefore, Alice and Bob decide to fight...in a game.

Alice find an old rectangular paper that consists of N*M grids. Two players take turns and Alice goes first. In each round of action, the player chooses a piece of paper and splits it horizontally or vertically along the grid line. If one player splits out a piece of paper with a single grid, he or she will lose the game. Alice and Bob are smart, and both of them want to win the game. Now you know the size of paper, please predict who will win.

输入:

Each line contains two integer numbers NN and MM, Process to end of file. (1<=N,M<=150,N∗M>1)(1<=N,M<=150,N∗M>1)

输出:

For each case, output the name of the winner.

样例输入:

1 2
1 6
4 3
3 5

样例输出:

Bob
Alice
Alice
Bob

In test case 1: No matter how Alice operates, she will cut out a 1*1 piece of paper. In test case 2: Alice split the paper along the vertical line between grid (1,3) and grid (1,4) at her first turn. In test case 3: At first, Alice split the paper along the horizontal line between grid (2,1) and grid (3,1), then there are two 2*3 papers. Then Alice can copy Bob's actions. In test case 4: Alice can’t win. The number of test cases is no more than 22499.

1月19:

描述:

爱丽丝和鲍勃喜欢剪纸游戏,但是他们只有一张新纸。他们两人都想使用这张纸,但是没有人想要撕破这张纸,因此,爱丽丝和鲍勃想要在游戏中一决胜负。

爱丽丝找到了一张有着N*M个网格的旧的长方形纸,两位玩家轮流上场,爱丽丝先上场,在每一轮的动作中,玩家选择一张纸,并沿网格线水平或垂直分割。如果一个玩家用一个格子把一张纸撕开,就将输掉比赛。爱丽丝和鲍勃两人都很聪明,他们都想赢得这场比赛。现在你知道纸的大小了,请预测谁会赢。

输入:

每一行包括两个整数N和M,直到进行到文件结尾。(1<=N,M<=150,N*M>1)

输出:

对于每一结果,输出胜利者的名字

样例输入:

1 2

1 6

4 3

3 5

样例输出:

Bob

Alice

Alice

Bob

在测试用例1中:无论爱丽丝怎样操作,她都会剪下一张1*1的纸。

在测试用例2中:爱丽丝在第一次转动时沿着网格(1,3)和网格(1,4)之间的垂直线拆分纸张。

在测试用例3中:首先,爱丽丝沿着网格(2,1)和网格(3,1)之间的水平线分割纸张,然后有两张2*3的纸张。然后爱丽丝可以模仿鲍勃的动作。

在测试用例4中:爱丽丝不会赢。测试用例的数量不超过22499个。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值