Array Minimum Queries
Given an array A[1..N] of N integers & Q queries each specifying a number K .
For each array ,you have to tell how many contiguous subarrays have their minimum element as K.
Input contains many test cases(<=20).Read till EOF.
First line of each test case consists of a single integer N.
Next line contains N integers.
Next line gives number of Queries Q, followed by Q values of K.
For each query print the required number of subarrays in a new line.
Print a blank line between 2 test cases.
5 7 2 4
3 2 5 0
1 2 1
2 1 2
Problem Setter : Jayant Mukherji