Too lazy for a story, let's jump into the question directly.
Given an array of size , and queries. In each query you are given two integers and . For each query find the product of number of even elements and number of odd elements from to (Both inclusive).
NOTE: This Question contains heavy I/O.
Input Format:
First line contains , the number of test cases.
First line of each test case contains two integers and , the size of the array and the number of queries respectively.
Second line of each testcase contains space separated integers (the array ).
Next lines of each testcase contains two integers and (0 - based), the start and end index respectively.
Output Format:
For each query (in all the testcases) print the required result.
Constraints:
1 <= <= 10
1 <= <= 100000
0 <= <
0 <= <= 1000
In the first test case,
Query 1: L = 0 R = 2
No of even = 2 (2,4)
No of odd = 1 (3)
Output = 2*1 = 2