文章
74
粉丝
0
获赞
111
访问
9.0k
#include<iostream>
#include<unordered_map>
using namespace std;
int main() {
int n;
while (cin >> n && n != 0) {
unordered_map<int, int> mp;
while (n -- ) {
int x;
cin >> x;
mp[x] ++ ;
}
int score;
cin >> score;
auto it = mp.find(score);
if (it != mp.end()) {
cout << mp[score] << endl;
} else {
cout << '0' << endl;
}
}
return 0;
}
登录后发布评论
暂无评论,来抢沙发