# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
300797 | TMJN | Mechanical Doll (IOI18_doll) | C++17 | 1 ms | 204 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 N;
void create_circuit(int M,vector<int>A) {
N = A.size();
vector<int>C(M+1,0);
vector<int>K=A;
vector<int>X,Y;
while(K.size()>=2){
vector<int>P;
for(int i=0;i+1<K.size();i+=2){
X.push_back(K[i]);
Y.push_back(K[i+1]);
P.push_back(-(int)X.size());
}
if(K.size()&1){
P.push_back(K.back());
}
swap(K,P);
}
C[0]=K.front();
answer(C,X,Y);
}
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... |