#include<iostream>
#include<cstring>
using namespace std;
const int maxn = 10010;
int scores[100] = {0};
int main(){
int N,K;
cin >> N;
for(int i = 0; i < N; i++){
int score;
scanf("%d", &score);
if(score >= 0 && score <= 100){
scores[score]++;
}
}
cin >> K;
for(int i = 0; i < K; i++){
int score;
scanf("%d", &score);
printf("%d", scores[score]);
if(i != K-1) printf(" ");
}
return 0;
}
原文地址:https://www.cnblogs.com/tsruixi/p/11787628.html
时间: 2024-10-10 02:58:24