# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
314466 | Vince729 | Monkey and Apple-trees (IZhO12_apple) | C++11 | 51 ms | 3096 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<iostream>
#include<cstdio>
#include<string>
#include<vector>
#include<cstring>
#include<algorithm>
#include<set>
using namespace std;
typedef long long ll;
const int MAXN = 100003;
const int MOD = 1000000007;
struct Node {
int l, r, sum;
bool z;
Node *ln, *rn;
Node(int _l, int _r): l(_l), r(_r), sum(0), z(0), ln(nullptr), rn(nullptr) {}
void upd(int a, int b) {
if (z) return;
if (a <= l && b >= r) {
sum = r-l+1;
z = true;
} else {
int mid = (l+r)/2;
if (a <= mid) {
if (!ln) ln = new Node(l, mid);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |