You are given an array A of length N and Q queries. Each query is described by two integers L and R. For each query, find the number of tuples (i,j,k) such that L≤i<j<k≤R and A[i]+A[j]+A[k] is an odd number.
Input Format
Output Format
For each test case, print an array of length Q, ith element will be the answer for the ith query - the number of tuples (i,j,k) such that L≤i<j<k≤R and A[i]+A[j]+A[k] is an odd number.
Constraints
1≤T≤101≤N,Q,A[i]≤1051≤L≤R≤N
For test case 1:
So our answer is 4.
For test case 2: