Submission #727942

#TimeUsernameProblemLanguageResultExecution timeMemory
727942Elvin_FritlCave (IOI13_cave)C++17
Compilation error
0 ms0 KiB
#include "cave.h" #include <bits/stdc++.h> using namespace std; void exploreCave(int n) { int v[n]; memset(v,0,sizeof(v)); int res[n]; for(int i=0;i<n;i++){ v[i]=1; int k=tryCombination(v); res[v]=i; v[i]=0; } answer(v,res); }

Compilation message (stderr)

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:12:12: error: invalid types 'int [n][int [n]]' for array subscript
   12 |         res[v]=i;
      |            ^
cave.cpp:11:13: warning: unused variable 'k' [-Wunused-variable]
   11 |         int k=tryCombination(v);
      |             ^