#include <iostream>
using namespace std;
bool check (int a[], int n, int x, int k) {
int res=x;
for (int i=0; i<n; i++) res+=a[i];
return res>k;
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int t; cin >> t;
while (t--) {
int x, k, n; cin >> x >> k >> n;
int a[n];
for (int i=0; i<n; i++) cin >> a[i];
if (check(a, n, x, k)) cout << "YES" << endl;
else cout << "NO" << endl;
}
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKYm9vbCBjaGVjayAoaW50IGFbXSwgaW50IG4sIGludCB4LCBpbnQgaykgewoJaW50IHJlcz14OwoJZm9yIChpbnQgaT0wOyBpPG47IGkrKykgcmVzKz1hW2ldOwoJcmV0dXJuIHJlcz5rOwp9CiAKaW50IG1haW4oKSB7CiAgICBpb3NfYmFzZTo6c3luY193aXRoX3N0ZGlvKGZhbHNlKTsKICAgIGNpbi50aWUobnVsbHB0cik7CiAgICAKICAgIGludCB0OyBjaW4gPj4gdDsKICAgIHdoaWxlICh0LS0pIHsKCSAgICBpbnQgeCwgaywgbjsgY2luID4+IHggPj4gayA+PiBuOwoJICAgIGludCBhW25dOyAKCSAgICBmb3IgKGludCBpPTA7IGk8bjsgaSsrKSBjaW4gPj4gYVtpXTsgCgkJaWYgKGNoZWNrKGEsIG4sIHgsIGspKSBjb3V0IDw8ICJZRVMiIDw8IGVuZGw7CgkJZWxzZSBjb3V0IDw8ICJOTyIgPDwgZW5kbDsKCX0KfQ==