*4-1 CCF 2014-12-1门禁系统
作者:互联网
门禁系统
题目描述
源代码
#include<iostream>
#include<cstring>
using namespace std;
const int N = 1000;
int a[N + 1];
int b[N + 1];
int main()
{
int n;
cin >> n;
memset(b, 0, sizeof(b));
for (int i = 0; i < n; i++)
{
scanf("%d", &a[i]);
b[a[i]]++;
if (i != n)
printf("%d ", b[a[i]]);
else printf("%d\n", b[a[i]]);
}
return 0;
}
标签:12,int,门禁系统,++,include,printf,2014,源代码 来源: https://blog.csdn.net/yexiaobai__/article/details/118857199