文章
33
粉丝
78
获赞
3
访问
18.4k
#include <stdio.h>
#include <iostream>
#include <algorithm>
#include <map>
using namespace std;
int main(){
int n,m;
int book;
int t;
map<int,int> s;
while(cin >> n >> m){
int r[n];
for(int i = 0;i < n ;i++){
cin >> book;
r[i] = book;
s[book]++;
}
for(int i = 0; i <n;i++){
if(s[r[i]] == 1)
cout << "BeiJu" <<endl;
else{
t = s[r[i]] - 1;
cout << t <<endl;
}}
}
return 0;
}
登录后发布评论
beiju判断有问题