

Time Limit: 2 sec / Memory Limit: 1024 MB
配点 : 点
問題文
長さ の数列 が与えられます。
以下の形式で与えられる 個のクエリに答えてください。
- 整数 が与えられる。 のうち、値が に等しいものの個数を求めよ。
制約
- 各クエリについて、
- 入力は全て整数
入力
入力は以下の形式で標準入力から与えられる。
ただし、 は 個目のクエリを表す。
各クエリは以下の形式で与えられる。
出力
行出力せよ。 行目には、 個目のクエリに対する答えを出力せよ。
入力例 1Copy
5 3 1 4 1 5 4 1 5 1 2 4 3 1 5 2 1 3 3
出力例 1Copy
2 0 0 1
個目のクエリでは、 のうち値が に等しいものの個数は です。
個目のクエリでは、 のうち値が に等しいものの個数は です。
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.
Sample Input 1Copy
5 3 1 4 1 5 4 1 5 1 2 4 3 1 5 2 1 3 3
Sample Output 1Copy
2 0 0 1
In the first query, two of have values equal to .
In the second query, zero of have values equal to .