# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
136341 | Boxworld | Mechanical Doll (IOI18_doll) | C++14 | 9 ms | 9676 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;
const int maxN=400010;
typedef vector<int> vec;
vec G[maxN];
int tmp=-1;
void create_circuit(int M, std::vector<int> A){
A.push_back(0);
int N=A.size();
vec C(M+1),X(15),Y(15);
for (int i=0;i<=M;i++)C[i]=-1;
C[0]=A[0];
for (int i=1;i<=7;i++){
X[i-1]=-i*2;
Y[i-1]=-i*2-1;
}
X[7]=A[1];Y[7]=A[9];
X[8]=A[5];Y[8]=A[13];
X[9]=A[3];Y[9]=A[11];
X[10]=A[7];Y[10]=A[15];
X[11]=A[2];Y[11]=A[10];
X[12]=A[6];Y[12]=A[14];
X[13]=A[4];Y[13]=A[12];
X[14]=A[8];Y[14]=A[16];
// for (int i=0;i<=M;i++)printf("%d: %d\n",i,C[i]);
// for (int i=0;i<X.size();i++)printf("%d: [x]%3d [y]%3d\n",-1-i,X[i],Y[i]);
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... |