# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
295367 | Kastanda | Mechanical Doll (IOI18_doll) | C++11 | 33 ms | 2636 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.
// M
#include<bits/stdc++.h>
#include "doll.h"
using namespace std;
const int N = 400005;
int n, m, k, len, A[N], L[N], R[N];
int M[N];
void DFS(int v, int tag)
{
assert(v <= len);
if (M[v] == 0)
{
if (L[v] == 0)
L[v] = tag;
else
DFS(-L[v], tag);
}
else
{
if (R[v] == 0)
R[v] = tag;
else
DFS(-R[v], tag);
}
M[v] ^= 1;
}
void create_circuit(int _m, vector < int > _A)
{
m = _m;
# | 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... |