Submission #992833

#TimeUsernameProblemLanguageResultExecution timeMemory
992833mohammedMonemCave (IOI13_cave)C++14
Compilation error
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); }

Compilation message (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