제출 #248947

#제출 시각아이디문제언어결과실행 시간메모리
248947REALITYNBCave (IOI13_cave)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> 
#include "cave.h"
using namespace std ; 
void exploreCave(){
	int n; 
	cin>> n ; 
	int a[n] ; 
	memset(a,0,sizeof a) ; 
	int door = 0  ; 
	for(;door<n;door++){
		int ans = trycombination(a) ;
		if(ans==door){
			ans[i] = 1 ; 
		}
	}
	int aa[n] ; 
	for(int i=0;i<n;i++)aa[i] = i ; 
	answer(a,aa) ; 
	return ; 
}

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

cave.cpp: In function 'void exploreCave()':
cave.cpp:11:13: error: 'trycombination' was not declared in this scope
   int ans = trycombination(a) ;
             ^~~~~~~~~~~~~~
cave.cpp:11:13: note: suggested alternative: 'tryCombination'
   int ans = trycombination(a) ;
             ^~~~~~~~~~~~~~
             tryCombination
cave.cpp:13:8: error: 'i' was not declared in this scope
    ans[i] = 1 ; 
        ^