제출 #1078389

#제출 시각아이디문제언어결과실행 시간메모리
1078389sqrteipiCluedo (IOI10_cluedo)C++14
컴파일 에러
0 ms0 KiB
#ifdef __cplusplus
extern "C" {
#endif
int Theory(int M, int L, int W);
void Solve();
#ifdef __cplusplus
}
#endif

// TODO: global variables can be declared here

void Solve() {
  bool m[6], l[10], w[6];
  int a=0, b=0, c=0, i, rt;
  for (i=0; i<6; i++){
    m[i] = true; l[i] = true; w[i] = true;
  }
  for (i=6; i<10; i++){
    l[i] = true;
  }
  
  for (i=0; i<20; i++){
    while (!m[a]){
      a++;
    }
    while (!l[b]){
      b++;
    }
    while (!w[c]){
      c++;
    }
    rt = Theory(a+1, b+1, c+1);
    if (rt==0){
      break;
    }
    else if (rt==1){
      m[a] = false;
    }
    else if (rt==2){
      l[b] = false;
    }
    else{
      w[c] = false;
    }
  }
}

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

/usr/bin/ld: /tmp/ccQPw83s.o: in function `main':
grader.c:(.text.startup+0x49): undefined reference to `Solve()'
/usr/bin/ld: /tmp/cclpXgKu.o: in function `Solve':
cluedo.cpp:(.text+0x102): undefined reference to `Theory'
collect2: error: ld returned 1 exit status