You are given the following
Your task is to print the number of elements in A that are greater than h. You are given a total of K such tasks.
Example
Consider N = 5, A = [9, 3, 5, 1, 15], K = 2, and h = [2, 10].
For the 1st query, the elements greater than 2 are [9, 3, 5, 15]. Thus answer is 4.
For the 2nd query, the elements greater than 10 are [15]. Thus answer is 1.
Therefore the answer is [4, 1].
Function description
Complete the Solve function provided in the editor. This function takes the following 4 parameters and returns a list of values:
Input format
Note: This is the input format that you must use to provide custom input (available above the Compile and Test button).
Output format
For each task, print in a new line the number of elements in A that are greater than h.
Constraints
1≤N≤1051≤A[i]≤1091≤K≤1051≤h≤109
Code snippets (also called starter code/boilerplate code)
This question has code snippets for C, CPP, Java, and Python.
In the array A=[1,5,3,2,4], there are 3 elements that are greater than 2.