文章
59
粉丝
0
获赞
326
访问
7.5k
#include <bits/stdc++.h>
using namespace std;
int main()
{
int N,M;
int record[200];//record the reader
while(cin>>N>>M)
{
map<int,int> list;//key equals book number,value equals how many ppl likes it
for(int i=0;i<N;i++)
{
int book;
cin>>book;
record[i]=book;
list[book]++;
}
for(int i=0;i<N;i++)
{
if(list[record[i]]>1)
cout<<list[record[i]]-1<<endl;
else
cout<<"BeiJu"<<endl;
}
}
return 0;
}
登录后发布评论
暂无评论,来抢沙发