## Angry Professor

**The Problem statement is from "hackerrank.com" and I solved it using "javascript".**

**At the bottom look for my derived solution.**

**Problem Statement**

The professor is conducting a course on Discrete Mathematics to a class of

Given the arrival time of each student, your task is to find out if the class gets cancelled or not.

**Input Format**The first line of the input contains

The first line of each test case contains two space-separated integers,

The next line contains

If the arrival time of a given student is a non-positive integer (

**Output Format**For each testcase, print

*"YES"*(without quotes) if the class gets cancelled and

*"NO"*(without quotes) otherwise.

**Constraints**

**Note**If a student enters the class exactly when it starts

1≤T≤10 1≤N≤1000 1≤K≤N −100≤ai≤100,where i∈[1,N]

**Sample Input**

```
2
4 3
-1 -3 4 2
4 2
0 -1 2 1
```

**Sample Output**

```
YES
NO
```

**Explanation**

*are*

**Solution :-**

## No comments:

## Post a Comment