제출 #521035

#제출 시각아이디문제언어결과실행 시간메모리
521035ColourAttila동굴 (IOI13_cave)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #include "cave.h" using namespace std; void exploreCave(int n) { /*int a[] = {1, 1, 1, 0}; int b[] = {3, 1, 0, 2}; answer(a, b);*/ int a[n], b[n]; for(int i = 0; i < n; i++) { a[i] = 0; b[i] = i; } for(int i = tryCombination(a); i < n; i++) { a[i] = 1 - a[i]; i = last = tryCombination(a); } answer(a, b); }

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

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:20:13: error: 'last' was not declared in this scope
   20 |         i = last = tryCombination(a);
      |             ^~~~