Submission #136341

#TimeUsernameProblemLanguageResultExecution timeMemory
136341BoxworldMechanical Doll (IOI18_doll)C++14
10 / 100
9 ms9676 KiB
#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)

doll.cpp: In function 'void create_circuit(int, std::vector<int>)':
doll.cpp:10:6: warning: unused variable 'N' [-Wunused-variable]
   10 |  int N=A.size();
      |      ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...