#C11398. Temperature Reading Range Checker

    ID: 40709 Type: Default 1000ms 256MiB

Temperature Reading Range Checker

Temperature Reading Range Checker

In this problem, you are given a list of integer temperature readings along with two integers representing the lower and upper bounds of an acceptable range. Your task is to determine whether all the temperature readings fall within the inclusive range ([lower_bound, upper_bound]). If every reading is between the lower and upper bounds (inclusive), output True; otherwise, output False.

inputFormat

The input is read from standard input and consists of three lines:

  1. The first line contains a single integer n, representing the number of temperature readings.
  2. The second line contains n space-separated integers, representing the temperature readings. If n is 0, this line will be empty.
  3. The third line contains two space-separated integers, representing the lower_bound and upper_bound respectively.

outputFormat

Output a single line to standard output. Print True if all temperature readings are within the range [lower_bound, upper_bound] (inclusive), otherwise print False.## sample

5
23 25 24 22 26
20 27
True