mirror of
https://github.com/xlucn/PAT.git
synced 2026-02-06 19:12:14 +08:00
21 lines
310 B
C
21 lines
310 B
C
#include <stdio.h>
|
|
|
|
int main()
|
|
{
|
|
int N, M, score, count[101] = {0};
|
|
|
|
scanf("%d", &N);
|
|
for (int i = 0; i < N; i++) {
|
|
scanf("%d", &score);
|
|
count[score]++;
|
|
}
|
|
|
|
scanf("%d", &M);
|
|
for (int i = 0; i < M; i++) {
|
|
scanf("%d", &score);
|
|
printf("%d%c", count[score], i == M - 1 ? '\n' : ' ');
|
|
}
|
|
|
|
return 0;
|
|
}
|