# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
148100 | WhipppedCream | Editor (BOI15_edi) | C++17 | 644 ms | 195312 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>
//#ifdef atom #else #endif
using namespace std;
typedef long long ll; typedef pair<int, int> ii;
#define X first
#define Y second
#define vi vector<int>
#define vii vector< ii >
#define pb push_back
int n;
struct node
{
int v;
node *left, *right;
node(int _v, node *a, node *b)
{
v = _v;
left = a; right = b;
}
node *insert(int x, int dx, int L = 0, int R = n)
{
if(L<= x && x<= R)
{
if(L == R) return new node(dx, NULL, NULL);
int M = (L+R)/2;
node *ret = new node(0, left->insert(x, dx, L, M), right->insert(x, dx, M+1, R));
ret->v = max(ret->left->v, ret->right->v);
//printf("L R is %d\n", ret->v);
return ret;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |