A - Comfortable Temperature Editorial /

Time Limit: 2 sec / Memory Limit: 1024 MiB

配点 : 200

問題文

高橋君は N 日間の休暇を取る予定です。i 日目 (1 \leq i \leq N) の予想気温は T_i ℃ です。

高橋君は、気温が L ℃ 以上 R ℃ 以下の日を「お出かけ日和」と考えています。

N 日間のうち、お出かけ日和は何日あるか求めてください。

制約

  • 1 \leq N \leq 10^5
  • -100 \leq L \leq R \leq 100
  • -100 \leq T_i \leq 100
  • 入力はすべて整数である

入力

入力は以下の形式で標準入力から与えられる。

N L R
T_1
T_2
\vdots
T_N

1 行目には、休暇の日数 N、お出かけ日和とみなす気温の下限 L、上限 R がスペース区切りで与えられる。

続く N 行の i 行目 (1 \leq i \leq N) には、i 日目の予想気温 T_i が与えられる。

出力

お出かけ日和の日数を 1 行で出力してください。


入力例 1

5 20 25
18
20
22
25
30

出力例 1

3

入力例 2

4 10 12
9
13
0
100

出力例 2

0

入力例 3

10 -5 5
-10
-5
-3
0
4
5
6
10
-1
-6

出力例 3

6

入力例 4

20 15 30
12
15
18
21
24
27
30
33
14
16
19
22
25
28
31
29
17
13
30
20

出力例 4

15

入力例 5

1 -100 -100
-100

出力例 5

1

Score : 200 pts

Problem Statement

Takahashi plans to take an N-day vacation. The forecasted temperature on day i (1 \leq i \leq N) is T_i ℃.

Takahashi considers a day to be a "nice day for an outing" if the temperature is at least L ℃ and at most R ℃.

Out of the N days, determine how many are nice days for an outing.

Constraints

  • 1 \leq N \leq 10^5
  • -100 \leq L \leq R \leq 100
  • -100 \leq T_i \leq 100
  • All inputs are integers

Input

Input is given from standard input in the following format:

N L R
T_1
T_2
\vdots
T_N

The first line contains the number of vacation days N, the lower bound L, and the upper bound R of the temperature range considered nice for an outing, separated by spaces.

The i-th of the following N lines (1 \leq i \leq N) contains the forecasted temperature T_i on day i.

Output

Print the number of nice days for an outing in a single line.


Sample Input 1

5 20 25
18
20
22
25
30

Sample Output 1

3

Sample Input 2

4 10 12
9
13
0
100

Sample Output 2

0

Sample Input 3

10 -5 5
-10
-5
-3
0
4
5
6
10
-1
-6

Sample Output 3

6

Sample Input 4

20 15 30
12
15
18
21
24
27
30
33
14
16
19
22
25
28
31
29
17
13
30
20

Sample Output 4

15

Sample Input 5

1 -100 -100
-100

Sample Output 5

1