文章
79
粉丝
221
获赞
46
访问
198.4k
#include <iostream>
using namespace std;
int main() {
int n, m;
while(cin >> n >> m){
int* a = new int[n], * b = new int[m+1];
for (int i = 0; i < m+1; i++)
b[i] = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
b[a[i]]++;
}
for (int i = 0; i < n; i++) {
if (b[a[i]] - 1 > 0)
cout << b[a[i]] - 1 << endl;
else
cout << "BeiJu" << endl;
}
}
return 0;
}
登录后发布评论
暂无评论,来抢沙发