# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
856452 | hartiksalaria | Bigger segments (IZhO19_segments) | C++17 | 1116 ms | 262144 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 namespace std;
struct Node {
int mx;
Node() {
mx = -1e9;
}
Node(int val) {
mx = val;
}
};
struct Seg {
int n;
vector<Node> st;
Node merge(Node &l, Node &r) {
Node res;
res.mx = max(l.mx, r.mx);
return res;
}
Seg(int _n) {
this->n = _n;
st.assign(4 * _n, Node());
}
void update(int l, int r, int x, int val, int node) {
if (l > x || r < x) {
return;
}
if (l == r) {
st[node].mx = max(st[node].mx, val);
# | 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... |