#abc248d. D - Range Count Query
D - Range Count Query
Score : points
问题描述
你得到一个长度为 的序列:。
按照以下格式回答 个查询。
- 给定整数 , 和 。找出 中值等于 的元素的数量。
以上为通义千问 qwen-max 翻译,仅供参考。
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.
Sample Input 1
5
3 1 4 1 5
4
1 5 1
2 4 3
1 5 2
1 3 3
Sample Output 1
2
0
0
1
In the first query, two of have values equal to .
In the second query, zero of have values equal to .
update @ 2024/3/10 10:37:05