# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
848600 | Darren0724 | Monkey and Apple-trees (IZhO12_apple) | C++17 | 245 ms | 81328 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 segtree{
struct seg{
int lz,val,lc,rc;
};
vector<seg> v;
int cnt1=0;
int New(){
return cnt1++;
}
segtree(){
New();
v.resize(5000000,{0,0,-1,-1});
}
int rv(seg &s,int l,int r){
return (s.lz?r-l:s.val);
}
void check(seg &s){
if(s.lc==-1){
s.lc=New();
}
if(s.rc==-1){
s.rc=New();
}
}
void push(seg &s){
v[s.lc].lz|=s.lz;
v[s.rc].lz|=s.lz;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |