#include<iostream> #include<vector> int main() { int n, m; int book[201]; std::vector<int> v; while (std::cin >> n >> m) { std::fill(book, book+201, 0); v.reserve(n); int a; for (int i = 0; i < n; i++) { std::cin >> a; book[a]++;//使用标记数组,对带有相同图书编号的自动加1 v.push_back(a);//记录输入图书编号的顺序 } for(int i : v) { if(book[i] > 1) std::cout << book[i]-1 << std::endl; else std::cout << "BeiJu" << std::endl; } } }