P16841 [HackerEarth] The Fabled Treasure of the Sphinx is kept in a magical chamber guarded by the Sphinx herself. The Death Eaters decided to exploit this and use it to retrieve the cherished magical items
普及
题目描述

The Fabled Treasure of the Sphinx is kept in a magical chamber guarded by the Sphinx herself. The Death Eaters decided to exploit this and use it to retrieve the cherished magical items that the chest could spew. The chamber has two entrances each having property that only one wizard could enter and after he exits another could enter. No time is lost while the wizards are exchanged. It takes one second to cast one spell. The trouble is that according to the calibre of each wizard, they could cast only a specific number of retrieval spells. They have a certain amount of time before the fearful guardian awakens. So the Death Eaters ask you for help in determining whether it is possible for all the wizards to be able to cast spells.

INPUT:
The first line contains T denoting the number of test cases. Each test case consist of two lines containing N and S denoting the number of wizards and the time available. The next line contains N space separated numbers X[i] denoting the number of spells each wizard can cast.

OUTPUT:
For each test case print YES if the retrieval is possible otherwise NO.

CONSTRAINTS:
1 ≤ T ≤ 40
1 ≤ N ≤ 200
1 ≤ S ≤ 100000
0 ≤ X[i] ≤ 200

SAMPLE INPUT
2
3 4
2 4 2
3 3
3 3 3

SAMPLE OUTPUT
YES
NO

Explanation

T=2 test cases
Now, in the first test-case:

At t=0 Wizard 3 enters door 1 and Wizard 2 enters door 2.
At t=2 Wizard 1 enters door 1 and Wizard 3 exits.
At t=4 Wizard 2 and 1 exits.

输入格式

见题面

输出格式

见题面

样例输入
20 85 2101 58 72 96 13 36 1 69 10 35 5 13 32 2 76 38 29 54 26 54 57 50 69 35 67 10 28 27 90 28 69 31 58 34 12 77 33 62 95 7 65 18 67 56 27 30 13 42 65 14 34 95 53 60 90 81 50 79 44 53 81 92 69 59 11 89 39 7 49 1 64 99 7 62 95 43 96 51 82 78 75 36 63 60 58 41 100 2438 72 86 94 31 39 47 5 9 96 53 59 72 65 36 93 82 34 45 63 82 37 24 39 43 96 42 18 97 76 53 10 0 3 54 25 58 29 23 34 5 10 85 58 21 92 60 99 78 78 70 75 7 9 15 15 45 75 11 33 49 90 3 5 35 24 23 53 47 92 94 18 28 94 10 79 16 89 91 24 23 77 23 14 40 41 51 27 94 96 5 18 94 67 74 33 49 41 53 57 69 71 1719 71 40 80 81 28 56 80 24 13 7 95 67 53 52 19 49 28 89 1 54 60 11 11 80 20 18 66 52 23 45 45 49 15 20 54 96 70 73 9 83 71 85 2 75 93 47 17 16 88 1 35 15 62 92 12 23 64 71 51 53 97 55 41 20 50 99 12 65 10 9 87 100 2443 49 60 5 22 79 75 70 50 14 37 85 50 5 32 79 74 34 26 49 59 22 10 19 26 30 98 28 58 99 6 0 92 44 78 76 15 49 92 12 7 98 48 33 0 73 36 7 13 18 1 98 76 57 14 45 27 35 52 86 82 94 76 50 87 38 62 51 87 62 98 62 46 21 80 96 67 19 77 37 85 44 16 79 57 28 55 67 20 46 84 15 25 3 34 55 71 88 3 4 83 100 2756 9 70 67 85 1 95 50 78 50 98 79 88 92 93 88 11 55 54 80 77 98 38 2 39 79 71 31 24 1 19 30 76 40 3 57 82 95 51 83 61 90 66 82 76 20 59 5 6 84 52 53 33 52 67 0 87 18 74 71 87 75 46 5 27 49 88 79 67 33 55 72 93 74 83 74 18 69 73 61 52 30 69 91 72 87 18 60 23 27 29 75 6 8 56 42 29 65 92 51 7 100 2717 7 86 45 55 81 16 0 31 45 88 90 37 20 39 8 96 74 80 62 46 65 68 39 73 3 74 54 87 54 41 63 82 23 86 4 66 38 82 25 86 35 55 68 63 84 94 93 80 84 70 50 8 77 71 81 0 66 64 5 94 69 78 2 50 44 13 83 58 79 63 68 0 66 59 5 36 83 14 72 58 57 89 59 73 16 68 94 1 51 22 28 81 83 59 27 12 16 50 95 91 1 10 10 69 1780 10 16 22 83 97 90 50 87 81 22 25 37 63 8 32 57 62 53 30 83 60 28 25 9 20 97 6 66 95 92 4 97 34 92 76 60 99 55 43 15 11 85 39 70 25 32 54 21 83 86 85 57 82 82 88 82 18 8 15 25 77 51 76 90 21 28 37 14 36 100 2781 78 88 33 94 67 84 96 93 58 60 28 50 9 94 18 85 44 9 91 79 71 4 65 23 53 33 31 91 73 41 53 98 55 52 17 19 99 20 13 82 86 17 45 80 12 70 82 18 67 91 68 71 66 98 82 63 89 58 7 96 56 19 67 9 46 55 71 26 45 16 76 97 60 58 68 30 58 0 58 89 37 46 28 34 88 61 19 37 80 46 3 56 83 73 4 94 6 78 91 76 90 2196 44 46 4 57 64 0 77 77 70 98 75 39 99 55 68 19 72 80 22 96 72 15 32 56 59 6 50 62 24 25 19 9 86 50 32 47 28 56 9 13 31 71 95 31 53 63 46 29 35 2 35 48 42 89 50 67 28 88 24 44 51 39 9 47 40 92 82 57 10 76 54 94 89 20 54 84 13 86 48 48 50 18 72 69 18 4 43 93 29 19 8 22 78 1 10 61 5 11 30 5 100 2572 80 5 75 99 37 87 54 68 3 88 35 30 47 25 87 1 17 52 33 33 39 60 91 3 89 32 69 70 47 9 80 4 91 46 19 53 75 14 15 44 93 67 3 43 12 29 83 15 41 31 17 21 58 34 75 70 27 73 63 90 70 40 97 75 50 37 42 94 57 65 11 89 59 45 72 85 9 81 71 20 92 56 66 66 88 80 44 92 57 71 14 21 28 25 90 76 2 29 46 81 15 370 1 52 44 41 19 17 80 1 65 86 97 92 56 2 89 67 1751 62 40 41 83 32 70 47 84 4 18 35 21 81 20 77 54 72 35 30 14 26 72 47 50 54 63 23 96 43 48 22 65 63 30 32 36 79 24 82 78 42 65 86 21 98 60 57 71 34 24 40 47 62 98 27 22 83 73 11 67 59 70 55 72 59 96 49 86 2142 81 40 3 42 82 95 8 5 25 26 10 34 51 24 95 89 95 51 56 64 38 96 48 84 91 11 90 35 64 56 64 82 56 4 51 43 14 66 68 47 60 42 57 90 75 48 23 33 1 26 73 55 90 40 64 35 1 67 93 26 44 4 51 45 63 10 34 93 47 0 88 33 6 66 87 55 55 46 1 8 49 60 61 72 29 94 81 2039 94 20 27 77 51 55 61 64 10 80 70 40 36 0 99 54 71 65 19 18 50 44 86 90 91 81 64 19 33 16 18 98 52 97 41 23 82 97 24 79 8 28 38 63 42 52 49 18 76 56 98 55 91 55 54 57 26 10 75 35 38 54 1 86 21 16 93 6 18 32 59 24 51 10 89 39 73 12 30 95 8 74 1680 19 69 49 99 89 22 11 60 34 50 42 87 53 57 10 44 82 45 29 87 87 62 43 5 63 15 24 37 86 5 16 73 87 5 78 89 15 28 79 11 4 39 53 33 86 0 53 12 21 69 81 34 47 18 26 51 2 61 86 99 87 35 22 15 42 19 33 3 54 92 59 30 43 4 100 2456 81 92 31 41 90 42 16 94 93 68 67 19 13 21 63 19 4 65 58 3 17 66 16 50 30 54 45 62 69 25 36 20 73 25 0 20 50 23 73 88 67 12 42 76 42 13 72 3 48 24 20 53 87 69 42 62 16 91 10 36 40 40 2 40 43 94 60 7 51 34 18 94 25 97 2 66 10 18 29 96 65 73 30 79 51 78 98 94 24 97 3 84 16 59 83 61 97 97 59 91 6 118 31 10 27 68 69 28 6 117 31 68 28 69 10 27
样例输出
NO YES YES YES YES YES NO YES YES YES YES YES YES YES YES YES NO NO NO NO