제출 #992833

#제출 시각아이디문제언어결과실행 시간메모리
992833mohammedMonem동굴 (IOI13_cave)C++14
컴파일 에러
0 ms0 KiB
#include "cave.h" #include <bits/stdc++.h> using namespace std; void exploreCave(int N) { int comp[N]; memset(comp, 0, N); bool try1 = tryCombination(comp); if (try1 > 0) { memset(comp, 1, N); try1 = tryCombination(comp); } int *v(N); for (int i = 0; i < N; ++i) { for (int j = 0; j < N; ++j) { comp[i] = !comp[i]; bool try2 = tryCombination(comp); if (try1 != try2) { v[i] = j; try1 = try2; break; } comp[i] = !comp[i]; } } answer(v, comp); }

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

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:14:12: error: invalid conversion from 'int' to 'int*' [-fpermissive]
   14 |     int *v(N);
      |            ^
      |            |
      |            int