제출 #670591

#제출 시각아이디문제언어결과실행 시간메모리
670591mseebacherCave (IOI13_cave)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
#include "cave.h"
using namespace std;
 
typedef long long ll;
typedef vector<int> vi;
#define MAXI (int)1e5

void exploreCave(int n){
	int b[n];
	for(int i = 0;i<n;i++){
		b[i] = i;
	}
	int s[n];
	for(int i = 0;i<n;i++) s[i] = 0;
	int val = tryCombination(s);
	while(val != -1){
		s[i] = 1-s[i];
		val = tryCombination(s);
	}
	answer(s,b);
}

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

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:18:5: error: 'i' was not declared in this scope
   18 |   s[i] = 1-s[i];
      |     ^