# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
613664 | tengiz05 | Two Antennas (JOI19_antennas) | C++17 | 3035 ms | 14784 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 <bits/stdc++.h>
using i64 = long long;
using namespace std;
constexpr int N = 2E5;
constexpr i64 inf = 1E18;
i64 A[N], historyMax[N];
void update(int p, i64 x) {
A[p] = x;
}
void decrease(int l, int r, int x) {
for (int i = l; i < r; i++) {
A[i] -= x;
historyMax[i] = max(historyMax[i], A[i]);
}
}
void increase(int l, int r, int x) {
for (int i = l; i < r; i++) {
A[i] += x;
}
}
int query(int l, int r) {
i64 res = -1;
for (int i = l; i < r; i++) {
res = max(res, historyMax[i]);
}
return res;
# | 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... |