试题编号: | 201412-1 |
试题名称: | 门禁系统 |
时间限制: | 1.0s |
内存限制: | 256.0MB |
/******************************************************************************
试题编号: 201412-1 试题名称: 门禁系统 时间限制: 1.0s 内存限制: 256.0MB
*******************************************************************************/
import java.util.Scanner;
import java.util.HashMap;
public class Main
{
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
HashMap<Integer,Integer> map = new HashMap<>();
for(int i = 1;i <= n; i++){
int tmp = in.nextInt();
if(map.containsKey(tmp)){
int val = map.get(tmp);
map.put(tmp,val+1);
int o = val+1;
System.out.print(o + " ");
}else{
map.put(tmp,1);
System.out.print(1 + " ");
}
}
}
}