Submission #670698

#TimeUsernameProblemLanguageResultExecution timeMemory
670698birthdaycakeCave (IOI13_cave)C++17
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> #include "cave.h" using namespace std; int vs[101],val[101],sw[101]; void exploreCave(int N) { for(int i = 0; i < n; i++){ for(int j = 0; j < n; j++){ if(!vs[j]){ val[j] = 0; } } int x = try_Combination(val), what = 0; if(x == i + 1) what = 1; for(int j = 0; j < n; j++){ if(!vs[j]){ val[j] = !what; } } for(int j = 0; j < n; j++){ if(!vs[j]){ val[j] = what; int ii = try_Combination(val); if(ii > i + 1){ sw[j] = i + 1; vs[j] = 1; break; } val[j] = !what; } } } answer(val, sw); }

Compilation message (stderr)

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:6:24: error: 'n' was not declared in this scope
    6 |     for(int i = 0; i < n; i++){
      |                        ^
cave.cpp:12:17: error: 'try_Combination' was not declared in this scope; did you mean 'tryCombination'?
   12 |         int x = try_Combination(val), what = 0;
      |                 ^~~~~~~~~~~~~~~
      |                 tryCombination
cave.cpp:15:24: error: 'what' was not declared in this scope
   15 |         if(x == i + 1) what = 1;
      |                        ^~~~
cave.cpp:18:27: error: 'what' was not declared in this scope
   18 |                 val[j] = !what;
      |                           ^~~~
cave.cpp:23:26: error: 'what' was not declared in this scope
   23 |                 val[j] = what;
      |                          ^~~~