#include<stdio.h>int main(){ int n; int a[1001]; int book[1001]; scanf("%d",&n); int i; for(i=1;i<=n;i++) { scanf("%d ",&a[i]); if(book[a[i]]==0) { a[i]=1; book[a[i]]=1; } else { book[a[i]]++; a[i]=book[a[i]]; } } for(i=1;i<=n;i++) PRintf("%d ",a[i]); printf("/n"); return 0;}
新闻热点
疑难解答