# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
999560 | phoenix | Mechanical Doll (IOI18_doll) | C++17 | 278 ms | 14928 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>
using namespace std;
int S = 0;
vector<int> X, Y;
int create_switch(int L, int R) {
X.push_back(L);
Y.push_back(R);
S++;
return -S;
}
int build(int l, int r, vector<int> a, vector<int> p) {
if (a.empty()) {
return -1;
}
if (l == r) {
return a[0];
}
int mid = (l + r) / 2;
int m = (int)a.size();
vector<int> la, lp, ra, rp;
for (int i = 0; i < m; i++) {
if (p[i] <= mid) {
la.push_back(a[i]);
lp.push_back(p[i]);
} else {
# | 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... |