# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
320971 | arnold518 | 자동 인형 (IOI18_doll) | C++14 | 156 ms | 14916 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;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int MAXN = 4e5;
vector<int> V;
int N, M, A[MAXN+10];
int B[MAXN+10], X[MAXN+10], Y[MAXN+10], C[MAXN+10], ncnt;
int solve(int l, int r)
{
bool flag=true;
for(int i=l; i<=r; i++) if(B[i]!=-1) flag=false;
if(flag) return -1;
if(l==r) return B[l];
int mid=l+r>>1;
int node=++ncnt;
X[node]=solve(l, mid);
Y[node]=solve(mid+1, r);
return -node;
}
void create_circuit(int _M, vector<int> _A)
{
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |