# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
889064 | shadow_sami | Monkey and Apple-trees (IZhO12_apple) | C++17 | 75 ms | 46740 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>
#define pb push_back
#define s second
#define f first
#define ll long long
#define pii pair<int,int>
#define left t->l,l,(l + r)/2
#define right t->r,(l + r)/2 + 1,r
using namespace std;
const int inf = 1000000000;
ll cnt = 0;
struct Node {
ll s,lz;
Node *l, *r;
Node() : s(0), lz(0), l(NULL), r(NULL) { }
};
void children(Node *t){
cnt++;
if (!(t->l)) t->l = new Node();
if (!(t->r)) t->r = new Node();
}
void push(Node *t,int l,int r){
if ((t -> lz) == 0) return;
int k = t -> lz;
(t -> l) -> lz = k;
(t -> l) -> s = (l + r)/2 - l + 1;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |