**Compilation/Execution Result:**

Given an array of N elements and L and R, print the number of sub-arrays such that the value of the maximum array element in that subarray is at least L and at most R.

**Input:**

First line of input contains a single integer T denoting the number of test cases.

First line of every test case has three numbers N, L and R.

Second line of every test case contains N integers separated by space.

**Output:**

For each test case, print a single number in every new line denoting the number of sub-arrays with maximum in range L-R

**Constraints: **

1<=T<=100

1<=N<=10^4

1<=L<=R<=10^6

**Example: **

**Input:**

2

5 1 10

2 0 11 3 0

3 2 4

3 4 1

**Output:**

4

5

**Explanation: **

Test Case 1: the sub-arrays {2}, {2, 0}, {3} and {3, 0} have maximum in range 1-10.

John Carey | 92 |

surbhi_7 | 76 |

jon_snow_zinda_hai | 58 |

ashrepos | 56 |

blackmonster | 54 |

Ibrahim Nash | 548 |

ashrepos | 474 |

RealHorror | 354 |

shaktiman_shaktiman_shaktiman | 320 |

shi143din | 293 |

akhayrutdinov | 4052 |

sanjay05 | 3406 |

Quandray | 2427 |

Michael Riegger | 2226 |

Jasleen Kaur 2 | 2012 |