100 atcoder#ABC248D. [ABC248D] Range Count Query
[ABC248D] Range Count Query
Score : points
Problem Statement
You are given a sequence of length : .
Answer queries given in the following format.
- You are given integers , , and . Find the number of elements among whose values are equal to .
Constraints
- , for each query.
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Here, represents the -th query.
Each query is in the following format:
Output
Print lines, the -th of which contains the answer to the -th query.
5
3 1 4 1 5
4
1 5 1
2 4 3
1 5 2
1 3 3
2
0
0
1
In the first query, two of have values equal to .
In the second query, zero of have values equal to .