Submission #414509

#TimeUsernameProblemLanguageResultExecution timeMemory
414509mosiashvililukaMechanical Doll (IOI18_doll)C++14
Compilation error
0 ms0 KiB
#include "doll.h" #include<bits/stdc++.h> using namespace std; int a,b,c,d,e,i,j,ii,jj,zx,xc,N,M,a; vector <int> A,C,X,Y; void create_circuit(int M, vector<int> AA) { N=AA.size(); for(i=0; i<N; i++){ A.push_back(AA[i]); } C.resize(M+1); C[0]=A[0]; for(i=0; i<M-1; i++){ C[A[i]]=A[i+1]; } C[M]=0; }

Compilation message (stderr)

doll.cpp:4:35: error: redefinition of 'int a'
    4 | int a,b,c,d,e,i,j,ii,jj,zx,xc,N,M,a;
      |                                   ^
doll.cpp:4:5: note: 'int a' previously declared here
    4 | int a,b,c,d,e,i,j,ii,jj,zx,xc,N,M,a;
      |     ^