제출 #1144794

#제출 시각아이디문제언어결과실행 시간메모리
1144794zhasyn동굴 (IOI13_cave)C++20
컴파일 에러
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; // }

컴파일 시 표준 에러 (stderr) 메시지

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