编程介的小学生 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 Python爬取指定微博话题下的内容,保存为txt
  • ¥15 vue2登录调用后端接口如何实现
  • ¥65 永磁型步进电机PID算法
  • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
  • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
  • ¥15 如何处理复杂数据表格的除法运算
  • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
  • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
  • ¥15 latex怎么处理论文引理引用参考文献
  • ¥15 请教:如何用postman调用本地虚拟机区块链接上的合约?