#### Registered Users Only

Please login to utilize this feature.

Do note that this website only supports submissions in C++.

### Problem Description

Pusheen is a fat and lazy cat. However, he might occasionally fly around town with his helicopter.

One day, Pusheen realises that that a portion of town is populated with many high-rise buildings, along a straight line. In total, there are *N* buildings in total, each of them equally spaced 1 unit apart, measured from midpoint to midpoint. In addition, the *i ^{th}* building from the left will have height

*H*units.

_{i}To past time, Pusheen decides to fly his helicopter there. He will pick a building *A* and fly to another building *B*. However, as Pusheen is not very good at flying, he is unable to fly between a pair of buildings if the *elevation ratio* is more than equal *U*. The *elevation ratio* between two buildings is the difference in height divided by the horizontal distance between them. For instance, the *elevation ratio* between two buildings *i* and *j* will be *abs(H _{i} - H_{j})/abs(i - j)* where abs is the absolute function.

However, flying with a low elevation ratio is also very boring. As such, Pusheen wants to know how many pairs of buildings there are such that their *elevation ratio* is between *L* ≤ *elevation ratio* < *U*.

To clarify, Pusheen does not consider pair (A, B) and pair (B, A) as two separate pairs, since the buildings and elevation ratio are the same.

### Input

The input will consist of 2 lines.

The first line will contain 3 integers, *N*, *L* and *U*.

The second line contain *N* integers, with the *i ^{th}* integer being

*H*.

_{i}### Output

Output a single integer, the number of pairs of buildings such that their elevation ratio is between *L* (inclusive) and *U* (exclusive).

### Subtasks

For all testcases, 0 ≤ *L* < *U* ≤ 10^{9} and 0 ≤ *H _{i}* ≤ 10

^{9}.

Subtask 1 (27%): 2 ≤ *N* ≤ 2000.

Subtask 2 (26%): 2 ≤ *N* ≤ 100000, 0 < *U - L* ≤ 10.

Subtask 3 (47%): 2 ≤ *N* ≤ 100000. No further restrictions.

Subtask 4 (0%): Sample Testcase

### Sample Testcase 1

#### Input

6 1 3 8 7 1 2 2 8

#### Output

7

#### Explanation

The pairs of buildings are (1, 2), (3, 4), (2, 4), (2, 5), (3, 6), (1, 4), (1, 5).

### Tags

### Subtasks and Limits

Subtask | Score | #TC | Time | Memory | Scoring |
---|---|---|---|---|---|

1 | 27 | 13 | 3s | 256MB | Minimum |

2 | 26 | 18 | 3s | 256MB | Minimum |

3 | 47 | 38 | 3s | 256MB | Minimum |

4 | 0 | 1 | 3s | 256MB | Minimum |

### Judge Compile Command

g++-8 ans.cpp -o flight -Wall -Wshadow -static -O2 -lm -m64 -s -w -std=gnu++17 -fmax-errors=512