Submission #336883

#TimeUsernameProblemLanguageResultExecution timeMemory
336883blue동굴 (IOI13_cave)C++11
Compilation error
0 ms0 KiB
#include "cave.h" #include <iostream> #include <vector> using namespace std; //Subtask 1: D[i] == i void exploreCave(int N) { int S[N]; for(int i = 0; i < N; i++) Q[i] = 0; int D[N]; for(int i = 0; i < N; i++) D[i] = i; int q; while(1) { q = tryCombination(S); if(q == -1) { answer(S); return; } else S[q] = !S[q]; } }

Compilation message (stderr)

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:11:32: error: 'Q' was not declared in this scope
   11 |     for(int i = 0; i < N; i++) Q[i] = 0;
      |                                ^
cave.cpp:22:21: error: too few arguments to function 'void answer(int*, int*)'
   22 |             answer(S);
      |                     ^
In file included from cave.cpp:1:
cave.h:9:6: note: declared here
    9 | void answer(int S[], int D[]);
      |      ^~~~~~