제출 #216177

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

컴파일 시 표준 에러 (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);
  ^~~~~~