#P2885. Height Filter

    ID: 16143 Type: Default 1000ms 256MiB

Height Filter

Height Filter

You are given N buildings and an integer threshold C. The first line of input contains two space-separated integers, N and C. Each of the next N lines contains a single integer representing the height of a building.

Your task is to count the number of buildings whose height is strictly greater than C. Mathematically, you need to compute:

\(count = \sum_{i=1}^{N} \mathbf{1}(\text{height}_i > C)\)

Output the computed count as a single integer.

inputFormat

The input contains:

  • Line 1: Two space-separated integers, N (the number of buildings) and C (the threshold).
  • Lines 2 to N+1: Each line contains one integer, the height of the building.

outputFormat

Output a single integer representing the number of buildings with height greater than C.

sample

5 10
8
12
15
10
7
2