代码:
#include<iostream>
using namespace std;
int main()
{
int n, m, L;
cin >> n >> m >> L;
int a[500][500];
int c[256] = { 0 };
for (int i = 0; i < n; i++)
{
for (int j = 0; j < m; j++)
{
cin >> a[i][j];
for (int k = 0; k < L; k++)
{
if (a[i][j] == k)
c[k]++;
}
}
}
for (int j = 0; j < L; j++)
{
cout << c[j] << " ";
}
cout << endl;
return 0;
}