Submission #226830

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

Compilation message (stderr)

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:7:5: error: 'memset' was not declared in this scope
     memset(S, 0, sizeof(S));
     ^~~~~~
cave.cpp:12:20: error: 'V' was not declared in this scope
         if(x == i) V[i] = 1;
                    ^
cave.cpp:15:16: error: invalid conversion from 'int' to 'int*' [-fpermissive]
     answer(N, D);
                ^
In file included from cave.cpp:1:0:
cave.h:9:6: note:   initializing argument 1 of 'void answer(int*, int*)'
 void answer(int S[], int D[]);
      ^~~~~~