# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
83254 | win11905 | Mechanical Doll (IOI18_doll) | C++14 | 124 ms | 12024 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 "doll.h"
#include <bits/stdc++.h>
#define pii pair<int, int>
#define x first
#define y second
using namespace std;
const int N = 3e5+5;
vector<int> A, X, Y;
int M, ptr = 1;
pii g[N];
bool state[N];
void solve(int p, int l, int r) {
int m = (l + r) >> 1;
if(l + 1 == r) {
if(M <= m) g[p].x = 1;
return;
}
g[p].y = ++ptr;
solve(ptr, l, m);
if(M > m) {
g[p].x = ++ptr;
solve(ptr, m+1, r);
} else {
g[p].x = 1;
}
}
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |