#include<iostream> #include<queue> #include<vector> using namespace std; struct Collect { priority_queue <int, vector<int>, greater<int>>number; int a = 0; }; Collect Friend[201]; vector<int> reader; void Getf(int i, int num) { Friend[num].number.push(i); Friend[num].a++; } int main() { int n, m; int temp; cin >> n >> m; for (int i = 0; i < n; i++) { cin >> temp; reader.push_back(temp); Getf(i, temp); } for (int i = 0; i < n; i++) { if (Friend[reader[i]].a > 1) cout << (Friend[reader[i]].a - 1) << endl; else cout << "BeiJu" << endl; } system("pause"); return 0; }