# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
37729 | 14kg | Monkey and Apple-trees (IZhO12_apple) | C++11 | 73 ms | 1112 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 <stdio.h>
#include <algorithm>
#define NN 1073741824
#define min2(x,y) (x<y?x:y)
#define max2(x,y) (x>y?x:y)
using namespace std;
struct TREE {
int num;
bool check;
TREE *left, *right;
} *top;
void check_node(TREE *node, int len) {
if (node->left == NULL) {
node->left = (TREE*)malloc(sizeof(TREE));
node->left->left = node->left->right = NULL;
node->left->num = node->check ? len : 0;
node->left->check = node->check;
}
if (node->right == NULL) {
node->right = (TREE*)malloc(sizeof(TREE));
node->right->left = node->right->right = NULL;
node->right->num = node->check ? len : 0;
node->right->check = node->check;
}
}
int f(TREE *node, int l, int r, int x, int y) {
int mid = (l + r) / 2;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |