Submission #770511

#TimeUsernameProblemLanguageResultExecution timeMemory
770511TymondCave (IOI13_cave)C++14
Compilation error
0 ms0 KiB
#include "cave.h" const int MAXN = 7e4 + 7; int S[MAXN]; int D[MAXN]; void exploreCave(int N) { for(int i = 0; i <= n - 1; i++){ S[i] = 0; } for(int i = 0; i <= n - 1; i++){ int kture = tryCombination(S); if(kture == i){ continue; } for(int j = 0; j <= n - 1; j++){ if(S[j] == 0){ S[j] = 1; int kture = tryCombination(S); if(kture == i){ continue; } S[j] = 0; }else{ S[j] = 0; int kture = tryCombination(S); if(kture == i){ continue; } S[j] = 1; } } } for(int i = 0; i <= n - 1; i++){ if(S[i] == 0){ S[i] = 1; int kture = tryCombination(S); D[i] = kture; S[i] = 0; }else{ S[i] = 0; int kture = tryCombination(S); D[i] = kture; S[i] = 1; } } answer(S, D); }

Compilation message (stderr)

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:9:25: error: 'n' was not declared in this scope
    9 |     for(int i = 0; i <= n - 1; i++){
      |                         ^
cave.cpp:13:26: error: 'n' was not declared in this scope
   13 |     for(int  i = 0; i <= n - 1; i++){
      |                          ^
cave.cpp:37:25: error: 'n' was not declared in this scope
   37 |     for(int i = 0; i <= n - 1; i++){
      |                         ^