编程介的小学生 2017-09-04 09:25 采纳率: 20.5%
浏览 800
已采纳

Be the Winner

Let's consider m apples divided into n groups. Each group contains no more than 15 apples, arranged in a line. You can take any number of consecutive apples at one time.

For example "@@@" can be turned into "@@" or "@" or "@ @"(two piles).

Two people get apples one after another and the one who takes the last is the loser.

Fra wants to know in which situations he can win by playing strategies (that is, no matter what action the rival takes, fra will win).

Input

You will be given several cases. Each test case begins with a single number n (1 <= n <= 3), followed by a line with n numbers, the number of apples in each pile. There is a blank line between cases.

Output

If a winning strategies can be found, print a single line with "Yes", otherwise print "No".

Sample Input

2
2 2

1
3

Sample Output

No
Yes

  • 写回答

2条回答

  • threenewbee 2017-09-04 15:49
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 DIFY API Endpoint 问题。
  • ¥20 sub地址DHCP问题
  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突