Submission #230261

#TimeUsernameProblemLanguageResultExecution timeMemory
230261Amy313Cave (IOI13_cave)C++14
Compilation error
0 ms0 KiB
#include "cave.h" void exploreCave(int N) { int S[N]; int D[N]; for(int i=0; i<N; i++) { S[i]=0; D[i] = i; } for(int i=0; i<N; i++) { int x= tryCombination(5); if(x==-1) { break; } if(x==i) { S[i]=1; } } answer(S, D); }

Compilation message (stderr)

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:13:26: error: invalid conversion from 'int' to 'int*' [-fpermissive]
   int x= tryCombination(5);
                          ^
In file included from cave.cpp:1:0:
cave.h:8:5: note:   initializing argument 1 of 'int tryCombination(int*)'
 int tryCombination(int S[]);
     ^~~~~~~~~~~~~~