Chef loves his work and earns a lot, but he has N expenditures to bear with. Chef wants to know if the amount he earns is good enough to pay all his expenses and give him a saving of at least half of his total earning.
The first line of the input contains T, the number of test cases.
The first line of each test case contains N, the number of expenditures, and S, the total amount he earns.
The second line of each case contains N space separated integers a1, a2, a3.... aN, where ai is the amount he has to pay for the ith expenditure.Note: Please trim trailing whitespaces
For each test case, output a single line containing either "Yes" if chef can pay the expenditures and get a saving of at least half of his total earning, otherwise "No".
- 1 ≤ T ≤ 100
- 1 ≤ N ≤ 100
- 1 ≤ ai ≤ 200
- 1 ≤ S ≤ 100000
Input: 3 3 9 1 2 3 4 35 2 7 8 1 2 20 2 6 Output: No No Yes
Test case 1: Total expenditure is 6 and total earning is 9, so saving is less than half. The amount Chef earns is not good enough.
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, SCM chicken, CLOJ, FS|
Fetching successful submissions