Submission #417927

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
4179272021-06-04 14:42:00aymanrsRainforest Jumps (APIO21_jumps)C++14
21 / 100
2876 ms1048580 KiB
#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;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...