-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path222.cpp
More file actions
73 lines (70 loc) · 1.2 KB
/
222.cpp
File metadata and controls
73 lines (70 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#include<bits/stdc++.h>
#define ll long long int
#define fi first
#define se second
#define pb push_back
#define pob pop_back
#define W while
#define fn(i,x) for(i=0;i<x;i++)
#define fs(i,s,x) for(i=s;i<x;i++)
#define fr(i,x) for(i=x;i>=0;i--)
#define fit(it,s) for(it=s.begin();it!=s.end();it++)
#define mp make_pair
#define pii pair<int,int>
#define pll pair<ll,ll>
#define vii vector<int>
#define vll vector<ll>
#define mii map<int,int>
#define mll map<ll,ll>
#define mod 1000000007
#define MAX 100005
#define M 32
using namespace std;
/*
ll gcd(ll a,ll b)
{
if(b==0)
return a;
else
return gcd(b,a%b);
}
*/
/*
ll modex(ll x,ll y)
{
x=x%mod;
ll r=1;
while(y>0)
{
if(y%2==1)
r=(r*x)%mod;
y/=2;
x=(x*x)%mod;
return r;
}
*/
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
//freopen("in.txt","r",stdin);
//freopen("out.txt","w",stdout);
ll t,n,k,v,c,i;
cin>>t;
W(t--)
{
cin>>n>>k;
c=0;
fn(i,n)
{
cin>>v;
if(v==1)
c++;
}
if(c+k>=n)
cout<<"YES\n";
else
cout<<"NO\n";
}
return 0;
}