# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
339792 | Vladikus004 | Monkey and Apple-trees (IZhO12_apple) | C++14 | 522 ms | 207812 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 mp make_pair
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define inf 2e9
using namespace std;
typedef long long ll;
typedef pair <int, int> pii;
struct node{
int sum, tl, tr, mod;
node *l, *r;
node(){
sum = 0; tl = tr = mod = -1;
l = r = nullptr;
}
node(int L, int R, int SUM){
sum = SUM; tl = L; tr = R;
mod = -1;
l = r = nullptr;
}
};
const int SZ = (int)1e9+3;
node *root = new node(0, SZ, 0);
void push(node *v){
if (v->tl == v->tr) return;
int tm = (v->tl + v->tr) / 2;
if (!v->l)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |