# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
286298 | NONAME | Meetings (IOI18_meetings) | C++14 | 5571 ms | 174544 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <iostream>
#include "meetings.h"
long long mx[5100][5100], f[5100][5100];
long long upd1(long long a, long long b) {
return (a > b) ? a : b;
}
long long upd2(long long a, long long b) {
return (a < b) ? a : b;
}
std::vector<long long> minimum_costs(std::vector<int> H, std::vector<int> L, std::vector<int> R) {
int n = (int)(H.size());
int q = (int)(L.size());
for (int i = 0; i < n; ++i)
mx[i][i] = H[i];
for (int i = 0; i < n; ++i)
for (int j = i + 1; j < n; ++j)
mx[i][j] = upd1(mx[j][j], mx[i][j - 1]);
for (int i = 0; i < n; ++i)
for (int j = 0; j < i; ++j)
mx[i][j] = mx[j][i];
for (int i = 0; i < n; ++i)
for (int j = 0; j < n; ++j)
f[i][j] = (j - 1 < 0 ? 0 : f[i][j - 1]) + mx[i][j];
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |