#K51787. Student Pass/Fail Evaluation

    ID: 29165 Type: Default 1000ms 256MiB

Student Pass/Fail Evaluation

Student Pass/Fail Evaluation

You are given a series of test cases. In each test case, you are provided with the number of students N, a list of N scores, and a passing score P. Your task is to determine for each case whether every student has passed, i.e. whether all scores are at least P.

If every student's score in a test case is greater than or equal to P, output PASS for that test case; otherwise, output FAIL.

The formal requirement for a test case is:

For each test case, given an integer N, a sequence of scores \(s_1,s_2,\ldots,s_N\), and a number \(P\), if \(s_i \ge P \; \forall\; 1 \le i \le N\) then print "PASS", else print "FAIL".

inputFormat

The input is read from standard input and is structured as follows:

  • The first line contains the integer T, the number of test cases.
  • For each test case, the following three lines are provided:
    • The first line contains an integer N representing the number of students.
    • The second line contains N space-separated integers representing the scores of the students.
    • The third line contains an integer P representing the minimum score required to pass.

outputFormat

For each test case, output a single line with either PASS or FAIL according to whether all students met the minimum score requirement.

## sample
2
3
55 65 75
50
4
90 40 60 80
50
PASS

FAIL

</p>