Submission #1144794

#TimeUsernameProblemLanguageResultExecution timeMemory
1144794zhasynCave (IOI13_cave)C++20
Compilation error
0 ms0 KiB
#include "cave.h" #include <bits/stdc++.h> #define pb push_back #define pf push_front using namespace std; #define F first #define S second typedef long long ll; #define pii pair <int, int> #define pll pair <ll, ll> typedef long double ld; const ll N = 5 * 1e5 + 100, M = 4096 + 10, len = 21, inf = 1e18; const ll mod = 1e9 + 7; void exploreCave(int n) { int ans[n], d[n]; for(int i = 0; i < n; i++){ ans[i] = 0; d[i] = i + 1; } while(true){ res = tryCombination(ans); if(res == -1) break; ans[res - 1] = 1 - ans[res - 1]; } answer(ans, d); } // int main() { // ios::sync_with_stdio(false); // cin.tie(NULL); // // return 0; // }

Compilation message (stderr)

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:23:17: error: 'res' was not declared in this scope
   23 |                 res = tryCombination(ans);
      |                 ^~~