제출 #1105144

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
11051442024-10-25 15:04:44jadai007동굴 (IOI13_cave)C++17
컴파일 에러
0 ms0 KiB
#include "cave.h"
#include<bits/stdc++.h>
using namespace std;
void exploreCave(int N) {
int state[MAX_N] = {0}, link[MAX_N] = {0}, inv[MAX_N] = {0};
for(int i = 0; i < N; ++i){
int ft = tryCombination(state);
state[i] = 1;
int nd = tryCombination(state);
if(ft == -1){
state[i] = 0;
break;
}
else if(nd == -1) break;
else if(ft != nd) state[i] = 0;
}
for(int i = 0; i < N; ++i){
state[i] = !state[i];
int ck = tryCombination(state);
link[i] = ck;
state[i] = !state[i];
}
answer(state, link);
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:7:15: error: 'MAX_N' was not declared in this scope
    7 |     int state[MAX_N] = {0}, link[MAX_N] = {0}, inv[MAX_N] = {0};
      |               ^~~~~
cave.cpp:9:27: error: 'state' was not declared in this scope; did you mean '_xstate'?
    9 |   int ft = tryCombination(state);
      |                           ^~~~~
      |                           _xstate
cave.cpp:20:3: error: 'state' was not declared in this scope; did you mean '_xstate'?
   20 |   state[i] = !state[i];
      |   ^~~~~
      |   _xstate
cave.cpp:22:3: error: 'link' was not declared in this scope
   22 |   link[i] = ck;
      |   ^~~~
cave.cpp:25:9: error: 'state' was not declared in this scope; did you mean '_xstate'?
   25 |  answer(state, link);
      |         ^~~~~
      |         _xstate
cave.cpp:25:16: error: 'link' was not declared in this scope
   25 |  answer(state, link);
      |                ^~~~