题目链接:
计算机软件能力认证考试系统http://118.190.20.162/view.page?gpid=T128
【分析】计数即可,数据量也不大
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int n, m, l;
Scanner scanner = new Scanner(System.in);
n = scanner.nextInt();
m = scanner.nextInt();
l = scanner.nextInt();
int[] ans = new int[l];
int i, j, a;
for(i = 0; i < n; i++){
for(j = 0; j < m; j++){
a = scanner.nextInt();
ans[a]++;
}
}
System.out.print(ans[0]);
for(i = 1; i < l; i++){
System.out.print(" ");
System.out.print(ans[i]);
}
System.out.println();
}
}