门禁系统
Time Limit: 1.0s
Memory Limit: 256.0MB
#include<iostream>
#include<string.h>
#define N 1005
using namespace std;
int count[N]={0};
int main()
{
int n,a;
while(cin>>n){
memset(count, 0, sizeof(count));
for(int i=0;i<n;i++)
{
cin>>a;
count[a]++;
cout<<count[a]<<" ";
}
cout<<endl;
}
return 0;
}