제출 #226832

#제출 시각아이디문제언어결과실행 시간메모리
226832jhtan동굴 (IOI13_cave)C++14
컴파일 에러
0 ms0 KiB
#include "cave.h" #include <bits/stdc++.h> using namespace std; 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); }

컴파일 시 표준 에러 (stderr) 메시지

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:15:20: error: 'V' was not declared in this scope
         if(x == i) V[i] = 1;
                    ^
cave.cpp:18: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[]);
      ^~~~~~