本人计概上半个学期的作业做完了

This commit is contained in:
rogerwang2008 committed 2026-10-19 19:01:58 +08:00
1 parent e0c09e0c7b
commit 0cfdc8499c
28 files changed
+1544 -125

No files matched your search

+7 -1
View File
@@ -11,7 +11,7 @@ struct Attendee {
int get_max_attendees_amount(std::vector<Attendee> attendees_schedule) {
std::array<int, MAX_T> bucket{};
std::array<int, MAX_T> bucket {};
for (const auto [enter_time, exit_time] : attendees_schedule) {
for (int t = enter_time; t < exit_time; t++) {
bucket[t]++;
@@ -43,6 +43,12 @@ int main() {
std::cout << attendees.size() << ' ' << get_max_attendees_amount(attendees) << std::endl;
int x = 6, ans = 0;
if (x > 5)
if (x > 10) ans = 1;
else
ans = 2;
std::cout << ans;
return 0;
}