浙江大学机试 统计同成绩学生人数 Easy
关键点:
无;
基本思想:
无;
#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
using namespace std;
int ht[101];
int main() {
int n;
int a;
while (cin >> n) {
fill(ht, ht + 101, 0);
if (n == 0)
return 0;
for (int i = 0; i < n; i++) {
cin >> a;
ht[a]++;
}
cin >> a;
cout << ht[a] << endl;
}
return 0;
}

浙公网安备 33010602011771号