#C12475. Filter Integers Greater Than a Threshold

    ID: 41906 Type: Default 1000ms 256MiB

Filter Integers Greater Than a Threshold

Filter Integers Greater Than a Threshold

You are given a list of integers and a threshold value \( n \). Your task is to output all integers from the list that are strictly greater than \( n \) while preserving their original order.

For example, if the input list is [1, 5, 8, 3, 12, 7] and \( n = 6 \), then the output should be [8, 12, 7].

inputFormat

The input consists of three parts provided via stdin:

  1. The first line contains an integer ( m ) (( 1 \le m \le 10^5 )) representing the number of elements in the list.
  2. The second line contains ( m ) space-separated integers.
  3. The third line contains an integer ( n ), the threshold value.

outputFormat

Output a single line containing the integers that are greater than ( n ), separated by a single space. If no such integer exists, output an empty line.## sample

3
10 20 30
5
10 20 30

</p>