# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
521715 | Soumya1 | Financial Report (JOI21_financial) | C++17 | 828 ms | 55616 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>
#ifdef __LOCAL__
#include <debug_local.h>
#endif
using namespace std;
const int mxN = 3e5 + 5;
int a[mxN];
int n, d;
template<typename T>
struct SegmentTree {
vector<T> t;
int n;
T identity = T();
SegmentTree() { }
SegmentTree(int _n) : n(_n) {
int lg = 31 - __builtin_clz(n);
if ((1 << lg) < n) lg++;
lg++;
t.assign((1 << lg) + 5, identity);
}
void update(int x, int lx, int rx, int p, T v) {
if (lx == rx) {
t[x] = v;
return;
}
int mx = (lx + rx) >> 1;
if (p <= mx) update(x << 1, lx, mx, p, v);
else update(x << 1 | 1, mx + 1, rx, p, v);
t[x] = max(t[x << 1], t[x << 1 | 1]);
}
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |