# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
998409 | amirhoseinfar1385 | Monkey and Apple-trees (IZhO12_apple) | C++17 | 50 ms | 3164 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;
int c;
struct node{
int cl,cr;
int res=0,f=0;
node(){
cl=cr=-1;
res=f=0;
}
}fakenode;
vector<node>all(1);
int getl(int u){
if(all[u].cl==-1){
all[u].cl=(int)all.size();
all.push_back(fakenode);
}
return all[u].cl;
}
int getr(int u){
if(all[u].cr==-1){
all[u].cr=(int)all.size();
all.push_back(fakenode);
}
return all[u].cr;
}
void upd(int u,int l,int r,int tl,int tr){
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |