Submission #216177

#TimeUsernameProblemLanguageResultExecution timeMemory
216177MODDI동굴 (IOI13_cave)C++14
Compilation error
0 ms0 KiB

void exploreCave(int n){
	int arr[n], door[n];
	memset(arr, 0, sizeof(arr));
	memset(door,0,sizeof(door));
	while(true){
		int pos = tryCombination(arr);
		if(pos == -1){
			break;
		}
		arr[pos] = 1 - arr[pos];
	}
	for(int i = 0; i < n; i++){
		arr[i] = 1 - arr[i];
		int pos = tryCombination(arr);
		//for(int j = 0; j < n;j++)
		//	cout<<arr[j]<<" ";
			
		//cout<<pos<<endl;
		door[i] = pos;
		arr[i] = 1 - arr[i];
	}
	answer(arr, door);
}

Compilation message (stderr)

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:4:2: error: 'memset' was not declared in this scope
  memset(arr, 0, sizeof(arr));
  ^~~~~~
cave.cpp:7:13: error: 'tryCombination' was not declared in this scope
   int pos = tryCombination(arr);
             ^~~~~~~~~~~~~~
cave.cpp:15:13: error: 'tryCombination' was not declared in this scope
   int pos = tryCombination(arr);
             ^~~~~~~~~~~~~~
cave.cpp:23:2: error: 'answer' was not declared in this scope
  answer(arr, door);
  ^~~~~~