logo AlgoBeat OnlineJudge
登录 注册

#215449. [VKOSHP 2025] Array Depletion

内存限制:512 MiB 时间限制:1000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

After a long journey home, the hare Xeni decided to play a game on her bunny phone.

The level in the game is described by an array of length and an integer . In one move, you can take adjacent elements of the array whose sum equals and remove them. After that, the size of the array will decrease by . You win the level if, after a certain number of moves, the array becomes empty.

The current level seemed very difficult to her, and she even doubted whether it was possible to complete it --- after all, there might be a situation where the game creators did not come up with more levels and made the last level impossible. Xeni turned to you for help --- tell her if it is possible to complete this game.

输入格式

The first line contains two integers , --- the size of the array and the sum of the elements to be removed (, ).

The second line of each test case contains numbers --- the elements of the game array ().

输出格式

Print , if Xeni can complete the level, and otherwise.

样例

样例输入 1

4 10
6 7 3 4

样例输出 1

Yes

样例输入 2

1 7
7

样例输出 2

No

样例输入 3

6 -3
-3 -9 6 3 -6 0

样例输出 3

Yes

样例输入 4

6 4
1 5 2 4 33 0

样例输出 4

No