Submission #1310869

#TimeUsernameProblemLanguageResultExecution timeMemory
1310869nataliaaCave (IOI13_cave)C++20
Compilation error
0 ms0 KiB
#include "cave.h" #include<bits/stdc++.h> using namespace std; void exploreCave(int N) { int v[N]={}; int a[N] ={}; int vis[N]={}; for(int i = 0; i < N; i++) { for(int j =0; j < N; j++) { if(vis[j]==0) a[j] = 0; } int ind = 0; int k = tryCombination(a); if(k==i) ind = 1; for(int j =0; j < N; j++) { if(vis[j]==0) a[j] = 1-ind; } for(int i = 0; i < N; i++) v[i] = i; vis[ok] = 1; a[ok] = ind; v[ok] =i; } answer( a,v); }

Compilation message (stderr)

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:19:13: error: 'ok' was not declared in this scope; did you mean 'k'?
   19 |         vis[ok] = 1;
      |             ^~
      |             k