浙江大学机试 统计同成绩学生人数 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;
}

  

posted @ 2020-03-13 23:51  暮云林凌  阅读(144)  评论(0)    收藏  举报