35 lines
849 B
C++
35 lines
849 B
C++
#include <algorithm>
|
|
#include <array>
|
|
#include <iostream>
|
|
#include <vector>
|
|
|
|
constexpr std::size_t MAX_N = 1001;
|
|
int students_amount, task_per_student, total_days;
|
|
std::array<std::array<bool, MAX_N>, MAX_N> arrangements;
|
|
|
|
|
|
int main() {
|
|
std::ios::sync_with_stdio(false);
|
|
std::cin.tie(nullptr);
|
|
|
|
std::cin >> students_amount >> task_per_student >> total_days;
|
|
for (int _ = 0; _ < students_amount; _++) {
|
|
for (int i = 0; i < task_per_student; i++) {
|
|
int day;
|
|
std::cin >> day;
|
|
arrangements[day][i] = true;
|
|
}
|
|
}
|
|
|
|
bool first = true;
|
|
for (int i = 1; i <= total_days; i++) {
|
|
if (!first) { std::cout << ' '; }
|
|
std::cout << std::count(arrangements[i].begin(), arrangements[i].end(), true);
|
|
first = false;
|
|
}
|
|
|
|
std::cout << std::endl;
|
|
|
|
return 0;
|
|
}
|