-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathProgram.cs
More file actions
27 lines (20 loc) · 763 Bytes
/
Program.cs
File metadata and controls
27 lines (20 loc) · 763 Bytes
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
using System;
using System.Linq;
namespace Angry_Professor {
class Program {
public static string AngryProfessor(int k, int[] ar) {
return ar.Count(x => x <= 0) < k ? "YES" : "NO";
}
static void Main(string[] args) {
int t = Convert.ToInt32(Console.ReadLine());
for (int i = 0; i < t; i++) {
string[] nk = Console.ReadLine().Split(' ');
int n = Convert.ToInt32(nk[0]);
int k = Convert.ToInt32(nk[1]);
int[] ar = Array.ConvertAll(Console.ReadLine().Split(' '), arTemp => Convert.ToInt32(arTemp));
string result = AngryProfessor(k, ar);
Console.WriteLine(result);
}
}
}
}