标签:stream name str 学生 main i++ namespace res ons
#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;
}
标签:stream name str 学生 main i++ namespace res ons
原文地址:https://www.cnblogs.com/tsruixi/p/11787628.html