A Discrete Mathematics Professor Has A Class Of Students Frustrated With Their Lack 3653476

A Discrete Mathematics professor has a class of students. Frustrated with their lack of discipline, he decides to cancel class if fewer than some number of students are present when class starts. Arrival times go from on time la rrivalTime < 0) to arrived late (arrivalTime > 0). Given the arrival time of each student and a threshhold number of attendees, determine if the class is canceled.
Input Format
The first line of input contains t, the number of test cases. Each test case consists of two lines. The first line has two space-separated integers, n and k. the number of students (size of a) and the cancellation threshold. The second line contains n spacesepa rated integers (a[1], , a HI describing the arrival times for each student. Note: Non-positive arrival times (all < 0) indicate the student arrived early or on time; positive arrival times (a[i] > 0) indicate the student arrived aril minutes late. For example, there are n = 6 students who arrive at times a = [-1, -1, 0, 0, 1, 1). Four are there on time, and two arrive late. If there must be k = 4 for class to go on. in this case the class will continue. If there must be k = 5. then class is cancelled.