# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
486366 | pannenkoek | Monkey and Apple-trees (IZhO12_apple) | C++14 | 27 ms | 8064 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;
#define rep(i, a, b) for(int i = a; i < (b); i++)
using ll = long long;
int m;
struct Node{
ll begin, end;
bool ripe;
Node *left, *right;
Node(ll b, ll e){
begin = b;
end = e;
}
void ins(ll a, ll b){
if(a <= begin && b >= end){
ripe = true;
return;
} if(b < begin || a > end) return;
if(left == NULL){
ll mid = (begin + end) / 2;
left = new Node(begin, mid);
right = new Node(mid + 1, end);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |