// Path: src/main/java/com/hackerrank/AngryProfessor.java
// static String isClassCancelled(int threshold, int[] arrivals) {
//     int onTime = 0;
//     for (int arrival : arrivals) {
//         if (arrival <= 0) {
//             onTime++;
//         }
//         if (onTime >= threshold) {
//             return "NO";
//         }
//     }
//     return "YES";
// }


import org.junit.Test;
import static com.hackerrank.AngryProfessor.isClassCancelled;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.IsEqual.equalTo;
package com.hackerrank;



public class AngryProfessorTest {

    @Test
    public void handlesSampleCase1() {
        int[] arrivals = {-1, -3, 4, 2};
        assertThat(isClassCancelled(3, arrivals), is(equalTo("YES")));
    }

    @Test
    public void handlesSampleCase2() {
// Path: src/main/java/com/hackerrank/AngryProfessor.java
// static String isClassCancelled(int threshold, int[] arrivals) {
//     int onTime = 0;
//     for (int arrival : arrivals) {
//         if (arrival <= 0) {
//             onTime++;
//         }
//         if (onTime >= threshold) {
//             return "NO";
//         }
//     }
//     return "YES";
// }


// Path: src/test/java/com/hackerrank/AngryProfessorTest.java
import org.junit.Test;
import static com.hackerrank.AngryProfessor.isClassCancelled;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.IsEqual.equalTo;

package com.hackerrank;



public class AngryProfessorTest {

    @Test
    public void handlesSampleCase1() {
        int[] arrivals = {-1, -3, 4, 2};
        assertThat(isClassCancelled(3, arrivals), is(equalTo("YES")));
    }

    @Test
    public void handlesSampleCase2() {
        int[] arrivals = {0, -1, 2, 1};