开始计概A下半学期。
This commit is contained in:
1 parent
0cfdc8499c
commit
38e97654e1
31 files changed
+2144
-110
No files matched your search
@@ -0,0 +1,34 @@
|
||||
#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;
|
||||
}
|
||||
Reference in new issue
Block a user