Block Adventure

아직 제출이 없습니다시간 제한1초메모리 제한256 MB

문제

Gildong is playing a video game called Block Adventure. In Block Adventure, there are nn columns of blocks in a row, and the columns are numbered from 11 to nn. All blocks have equal heights. The height of the ii-th column is represented as h_ih\_i, which is the number of blocks stacked in the ii-th column.

Gildong plays the game as a character that can stand only on the top of the columns. At the beginning, the character is standing on the top of the 11-st column. The goal of the game is to move the character to the top of the nn-th column.

The character also has a bag that can hold infinitely many blocks. When the character is on the top of the ii-th column, Gildong can take one of the following three actions as many times as he wants:

  • if there is at least one block on the column, remove one block from the top of the ii-th column and put it in the bag;
  • if there is at least one block in the bag, take one block out of the bag and place it on the top of the ii-th column;
  • if i\<ni\<n and h_ih_i+1k|h\_i-h\_{i+1}|\le k, move the character to the top of the i+1i+1-st column. kk is a non-negative integer given at the beginning of the game. Note that it is only possible to move to the next column.

In actions of the first two types the character remains in the ii-th column, and the value h_ih\_i changes.

The character initially has mm blocks in the bag. Gildong wants to know if it is possible to win the game. Help Gildong find the answer to his question.

입력

Each test contains one or more test cases. The first line contains the number of test cases tt (1t10001\le t\le 1000). Description of the test cases follows.

The first line of each test case contains three integers nn, mm, and kk (1n1001\le n\le 100, 0m1060\le m\le 10^6, 0k1060\le k\le 10^6) --- the number of columns in the game, the number of blocks in the character’s bag at the beginning, and the non-negative integer kk described in the statement.

The second line of each test case contains nn integers. The ii-th integer is h_ih\_i (0h_i1060\le h\_i\le 10^6), the initial height of the ii-th column.

출력

For each test case, print “YES” if it is possible to win the game. Otherwise, print “NO”.

You can print each letter in any case (upper or lower).

힌트

In the first case, Gildong can take one block from the 11-st column, move to the 22-nd column, put the block on the 22-nd column, then move to the 33-rd column.

In the second case, Gildong has to put the block in his bag on the 11-st column to get to the 22-nd column. But it is impossible to get to the 33-rd column because h_2h_3=3>k|h\_2-h\_3|=3>k and there is no way to decrease the gap.

In the fifth case, the character is already on the nn-th column from the start so the game is won instantly.