angry-lambda
Source: hackerearth
Difficulty: EASY

Prof. Lambda has N students in his class. Due to his ignorance his students has gone rogue on him and never comes to class on time. Prof. Lambda has decided to discipline them by canceling the class if fewer than K students are present when class starts.

You are given the arrival time of each student, determine if the class is canceled.

Input Format

The first line contains T, the number of test cases.

Each test case consists of two lines. The first line has N and K, space separated. The second line contains N space separated integers ( a1,a2,...,aN) describing the arrival time for each student. 

Note: Non-positive arrival times(ai ≤ 0 ) indicate the student arrived early or on time; Positive arrival time ( ai > 0 ) indicate the student arrived ai minutes late.

If a student arrives on time (ai = 0), the student is considered to have entered before the class started.

Output Format

For each test case, print the word YES if the class is canceled or NO if it is not.

Constraints

1 ≤ T ≤ 10
 1 ≤ N ≤ 1000
 1 ≤ K ≤ N
 -100 ≤ ai ≤ 100, where i \epsilon [1,N]

Sample Input
 3
 3 3
 -1 4 2
 5 1
 -1 2 3 5 0
 3 2
 -1 4 -1

Sample Output
 YES
 NO
 NO

SAMPLE INPUT
3
 3 3
 -1 4 2
 5 1
 -1 2 3 5 0
 3 2
 -1 4 -1

SAMPLE OUTPUT
YES
NO
NO


try:
	t = int(eval(input()))
	for i in range(t):
		n, k = list(map(int, input().split()))
		a = list(map(int, input().split()))
		s = 0
		l = [1 for i in a if(i <= 0)]
		l = sum(l)
		if(l < k):
			print("YES")
		else:
			print("NO")
except:
	a = 0


noc = eval(input())
while noc:
	noc-=1
	n, k = list(map(int, input().split()))
	cnt = 0
	lst = list(map(int, input().split()))
	cnt = sum([1 for x in lst if x <= 0])
	print("NO" if cnt >= k else "YES")


t=eval(input())
while t:
	t-=1
	n,k=list(map(int,input().split()))
	cnt=0
	lst=list(map(int,input().split()))
	for x in lst:
		if x<=0:
			cnt+=1
	if cnt<k:
		print("YES") 
	else:
		print("NO")


for _ in range(int(input())):
	n,k=list(map(int,input().split()))
	a=list(map(int,input().split()))
	ktest=0
	for i in range(n):
		if a[i]<0 or a[i]==0:
			ktest+=1
		else:
			pass
	if k>ktest:
		print("YES")
	else:
		print("NO")