# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1168687 | AlgorithmWarrior | Mechanical Doll (IOI18_doll) | C++20 | 39 ms | 8916 KiB |
#include <bits/stdc++.h>
#include "doll.h"
using namespace std;
void create_circuit(int M, std::vector<int> A) {
int N = A.size();
std::vector<int> C(M + 1,0);
C[0] = A[0];
if(N==1){
answer(C,{},{});
return;
}
for (int i = 1; i <= M; ++i) {
C[i] = -1;
}
std::vector<int>X,Y;
int id=-1;
X.push_back(0);
Y.push_back(0);
int i;
for(i=0;i<N-1;++i)
A[i]=A[i+1];
A[N-1]=0;
while(A.size()>2){
if(A.size()%2==1){
A.push_back(-1);
swap(A[A.size()-2],A[A.size()-1]);
}
int jum=A.size()/2;
# | 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... |