# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
417927 | aymanrs | Rainforest Jumps (APIO21_jumps) | C++14 | 2876 ms | 1048580 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 l, r, v = 1e9, i, lz = 0;
node *le = nullptr, *ri = nullptr, *c;
};
vector<node*> versions;
void prop(node* n){
if(n->l == n->r) goto gh;
if(n->le->i != n->i){
prop(n->le);
prop(n->c->le);
n->le = new node(*n->le);
n->le->i = n->i;
n->le->c = n->c->le;
n->le->v = min(n->le->v, n->le->c->v);
}
if(n->ri->i != n->i){
prop(n->ri);
prop(n->c->ri);
n->ri = new node(*n->ri);
n->ri->i = n->i;
n->ri->c = n->c->ri;
n->ri->v = min(n->ri->v, n->ri->c->v);
}
gh:
if(n->lz){
n->v += n->lz;
if(n->l != n->r){
n->le->lz += n->lz;
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |